hi all,

i need to know how to create a thread using pthread_create()?

i have never used pthread in c. am i supposed to used function pointer? how to pass arguments in thread function?

i need to know everything about pthread_create().

and yes i am using turbo c++ compiler and including the header file pthread.h , but i am getting error and it is not getting included.

please help. i need to finish my assignment on multithreading.

Drew.

Your compiler does not support threads. You will have to use a modern compiler such as Code::Blocks or VC++ 2008 Express, both are free for the downloading.

Comments
Yes

thanks for your reply.

but i want to know the synatx for pthreads. are we supposed to use pointer to functions in that?

Comments
seriously, you people need to quit using that piece of crap compiler.

thanks. i really need to go through some tutorial. can you suggest me a good book on pthreads for c?

Comments
You're verging on sounding like a troll with your gimme gimme gimme refrain

Check out this tutorial.

I have no idea about any books on the subject.

However, several books have been listed in the reference section of the given tutorial

Edited 6 Years Ago by thomas_naveen: n/a

drewangel : i am using turbo c++ compiler and including the header file pthread.h , but i am getting error and it is not getting included

AncientDragon : Your compiler does not support threads. You will have to use a modern compiler '

drewangel : thanks for your reply. but i want to know the synatx for pthreads. are we supposed to use pointer to functions in that?

my goodness. Reading comprehension, much?

Turbo C does not support multithreading. you will not get a POSIX thread library to work. What part of this are you not able to understand?

.

Edited 6 Years Ago by jephthah: n/a

But can we add thread.h header file and library to our compiler like Turbo C++ or dev C++ instead using of advance one??

Dev-C++ probably because that is a 32-bit compiler, Turbo C++ no because its only a 16-bit compiler and therefore can not access any of MS-Windows operating system.

This article has been dead for over six months. Start a new discussion instead.