developerWorks: Basic Use of pthreads
Feb 05, 2004, 06:00 (1 Talkback[s])
(Other stories by Peter Seebach)
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
"Outside of Anne McCaffrey's writing in the Dragonriders of Pern
series of novels, the word 'thread' is most feared by programmers.
Threads, sometimes called lightweight processes, are associated
with gigantic, complicated projects. Library functions have dire
warnings that they may not be 'thread safe.' But what are these
'threads?' What do you use them for? What are the risks?
"This article introduces threading with a simple threaded
application. The threading model used is the POSIX threading
interface, often called pthreads. Instructions are based on SuSE
Linux 8.2. The code has been tested on both SuSE Linux 8.2 and a
recent build of NetBSD-current..."