POSIX: Difference between revisions

From miki
Jump to navigation Jump to search
Line 4: Line 4:


* [https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming], excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore National Laboratory.
* [https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming], excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore National Laboratory.
* [http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html POSIX thread (pthread) libraries]
* [http://en.wikipedia.org/wiki/POSIX_Threads POSIX Threads] (wikipedia)
* [http://en.wikipedia.org/wiki/POSIX_Threads POSIX Threads] (wikipedia)


;Advices
;Advices
* For portability, always create ''joinable'' or ''detachable'' threads by setting explicitly the thread attribute (using <code>pthread_attr_getdetachstate</code>). This provides portability as not all implementations may create threads as joinable by default.
* For portability, always create ''joinable'' or ''detachable'' threads by setting explicitly the thread attribute (using <code>pthread_attr_getdetachstate</code>). This provides portability as not all implementations may create threads as joinable by default.

=== Debugging ===
See [[Debugging]] page.

Revision as of 16:20, 31 October 2012

PThreads

Links:

Advices
  • For portability, always create joinable or detachable threads by setting explicitly the thread attribute (using pthread_attr_getdetachstate). This provides portability as not all implementations may create threads as joinable by default.

Debugging

See Debugging page.