Multithreaded Programming Guide

Major API Differences

Solaris threads and pthreads are very similar in both API action and syntax. The major differences are listed in Table 8–1.

Table 8–1 Unique Solaris Threads and pthreads Features

Solaris Threads (libthread) 

POSIX Threads (libpthread) 

thr_ prefix for threads function names; sema_ prefix for semaphore function names

pthread_ prefix for pthreads function names; sem_ prefix for semaphore function names

Ability to create “daemon” threads 

Cancellation semantics 

Suspending and continuing a thread 

Scheduling policies