LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2011, 04:56 AM   #1
manaila
LQ Newbie
 
Registered: Apr 2010
Posts: 29

Rep: Reputation: 0
Question pthreads


Hi
In my code I want to have two different functions to be executed simultaneously (in parallel) in a single processor system. I tried to use pthreads but they happened to be executed one after another. I have heard about fork, some saying that its no longer recommended since its functions can be achieved by pthreads.
So I am kind of confused...how can I achieve parallelism.

cheers
 
Old 07-01-2011, 12:59 PM   #2
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: 1
Its very hard to say without seeing what you have in your code, you will need to post that to see if your code is right in the first place.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pthreads in c++ brevleq Programming 11 11-14-2009 05:52 AM
Pthreads a12ctic Linux - Software 1 06-09-2005 11:05 PM
pthreads ftgow Linux - Software 0 07-08-2004 04:55 AM
pthreads socket9001 Programming 2 12-29-2003 01:23 AM
pthreads Keith Hampton Linux - Software 1 10-23-2003 02:46 PM


All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration