views:

170

answers:

2

I have some confusion with POSIX Threads, I want to know if my understanding of Pthreads is proper,

According to me its a layer above the native layer which helps in dealing with multithreading. It provides a common syntax, which helps while porting from one OS to other. It internally takes care of the various OS specific constructs.

Please let me know if I am wrong and add points which I have missed.

+5  A: 

Yes, pthread is just an API, like rest of POSIX.

stepancheg
A: 

One important point here is that POSIX library is for *nix OSes and not for others (e.g. Windows). Although some implementation of pthreads library is available for windows, it is not exhaustive.

puffadder