6. POSIX adjusts to threads

“Who are you?” said the Caterpillar.This was not an encouraging opening for a conversation.Alice replied, rather shyly, “I—I hardly know, Sir,      just at present—at least I know who I was when I got up this morning, but      I think I must have been changed several times since then.”

Lewis Carroll, Alice’s Adventures in Wonderland

Pthreads changes the meaning of a number of traditional POSIX process functions. Most of the changes are obvious, and you’d probably expect them even if the standard hadn’t added specific wording. When a thread blocks for I/O, for example, only the calling thread blocks, while other threads in the process can continue to run.

But there’s another class of POSIX functions that doesn’t extend ...

Get Programming with POSIX ® Threads now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.