0

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.

7
Contributors
9
Replies
13
Views
6 Years
Discussion Span
Last Post by DeanMSands3
Featured Replies
  • 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. Read More

  • 1

    It is more than just to get the [URL="http://linux.die.net/man/3/pthread_create"]pthread_create() syntax[/URL] right. How about taking some time and going through [URL="http://www.google.fi/search?q=pthread+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fi:official&client=firefox-a"]pthread tutorial(s)[/URL] Read More

  • 3

    [QUOTE][B]drewangel :[/B] i am using turbo c++ compiler and including the header file pthread.h , but i am getting error and it is not getting included [B]AncientDragon : [/B]Your compiler does not support threads. You will have to use a modern compiler ' [B]drewangel : [/B]thanks for your reply. but … Read More

1

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
-1

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.
-1

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
0

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 by thomas_naveen: n/a

3

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 by jephthah: n/a

0

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

0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.