PDA

View Full Version : Multi-threading in C


christoforever
June 28th, 2007, 01:23 PM
hey guys i didnt know where to post this, but this seemed as good a place as any. Are there any libraries for multi-threading in C? I've been doing java programming for quite some time, seeing as this is all they teach at my university. I've just recently got back into programming in C, and couldent find any good sources for multi-threading. Any help would be greatly appreciated, or a point in the right direction.

sincerely,
Chris Dancy

slavik
June 28th, 2007, 01:24 PM
man pthreads :)

WebDrake
June 28th, 2007, 05:18 PM
The basic mechanism is pthread.h:
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
http://www.opengroup.org/pubs/online/7908799/xsh/pthread.h.html

There's also GNU Pth:
http://www.gnu.org/software/pth/

karthikbalaji
June 29th, 2007, 01:30 AM
Thanks a lot for the links man..Nice tutorial..Will be of a great help to me

KaeseEs
June 29th, 2007, 01:51 AM
A nice feature you get by using Pthreads is ease portability, as a very good (and GPL, too!) Pthreads implementation exists for w32, in addition to every unix supporting it natively.

g3k0
June 29th, 2007, 11:19 AM
Don't forget those mutex locks... otherwise you will get some crazy numbers and have no idea where they are coming from.

christoforever
July 6th, 2007, 10:07 AM
Just wanted to say thanks for all the help. Its a great step in the right direction.:popcorn: