Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Threads/Multi-threading
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 09-20-2007   #1 (permalink)
Just Joined!
 
Join Date: Sep 2007
Posts: 3
Threads/Multi-threading

Need some help with multi-threading. Basically I need to create a main that creates 2 threads. The 1 thread will read from one file and 2nd thread will read from the 2nd file (basically a file for each thread). The thread will begin reading characters from the file. If a thread encounters a space it will then call the second thread and the 2nd thread will be begin reading the 2nd file. This goes back and forth until both files have been completely read. I am new to threads and just a little confused. I am somewhat knowledgeable of pthread_create, pthread_cond_wait, pthread_exit, etc.. Maybe pseudocode a solution? Help is greatly appreciated.

Thanks,

David Wilks
static_cast is offline  

Reply With Quote
Old 09-21-2007   #2 (permalink)
Linux Engineer
 
RobinVossen's Avatar
 
Join Date: Aug 2007
Location: The Netherlands
Posts: 1,192
Send a message via ICQ to RobinVossen Send a message via MSN to RobinVossen
Hey, Id love to help yea.
though I have never worked on the Linux Kernel.. (I know.. its bad..)
But I have made serval C++ Programs that used Threading.
So can I help you maybe?
what do you exacly need?
Since I dont really get ur question..

I really hope I can help since I KNOW how anoying it is if you cant get replys in 3 hours.. so well If I can help reask your Question.

Cheers
- Robin
__________________
Linux User: 453003
New Users, please read this..
Google first, then ask..
RobinVossen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
generic server for all application layear protocols using multi threading suresh_rupineni Linux Networking 1 03-09-2007 08:47 AM
hyper threading is disabled. brugh The Linux Kernel 4 11-01-2006 11:56 AM
Hyper Threading? kingpin2051 Redhat / Fedora Linux Help 5 04-22-2005 08:18 PM
Is hyper threading enabled in suse 9.2 pro mrsavage SuSE Linux Help 2 02-04-2005 11:52 PM
Hyper Threading in Linux? Mado Misc 3 08-06-2003 02:40 PM

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 08:33 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2