Comparison of thread implementations
| Vendor |
Release |
SUSv2 |
1003.1c |
Other |
Notes |
| Sun |
Solaris |
cc -mt -D_XOPEN_SOURCE=500 -lpthread |
cc -mt -lpthread |
| UI |
cc -mt |
| ld -lpthread -lthread -lc |
|
|
| Compaq |
Tru64 UNIX |
| cc -pthread -D_XOPEN_SOURCE=500 |
| ld -lpthread -lexc -lc |
|
| cc -pthread |
| ld -lpthread -lexc -lc |
|
| DCE |
cc -threads |
| ld -lpthreads -lpthread -lexc -lc |
|
|
| OpenVMS 7.0 |
N/A |
LINK /THREADS_ENABLE |
| DCE |
cc /define=_PTHREAD_USE_D4 |
| LINK /THREADS_ENABLE |
|
|
| SGI |
IRIX |
|
|
sproc: |
|
| IBM |
AIX |
xlC_r -D_XOPEN_SOURCE=500 |
xlC_r |
N/A |
|
| OS/400 v4r2 |
N/A |
|
|
|
| HP |
HP-UX (to 10.20) |
N/A |
N/A |
|
|
| HP-UX 11.0 |
N/A |
cc -D_POSIX_C_SOURCE=199506L |
|
|
| SCO |
UnixWare 7 |
-Kthread -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=500 |
-Kthread -D_POSIX_C_SOURCE=199506 |
|
-Kthread is needed for link
gcc: -pthread instead of -Kthread
|
| Linux |
LinuxThreads |
gcc -pthread -D_XOPEN_SOURCE=500 |
gcc -pthread |
N/A |
|
| Apple |
Mac OS X |
|
|
|
|
| Microsoft |
Windows 95/98, NT |
N/A |
N/A |
|
|