Experimental pthread compatibility library
This patch adds pthread compatibility by using libmthread. To use this with a program using pthreads, you have to replace #include <pthread> with #define _MTHREADIFY_PTHREADS #include <minix/mthreads> This also changes the initialization function to be a constructor, which is implicitly called before the call to main. This allows for conformance with pthreads, while not paying a high price by checking on each mthread_* call whether the library has been initialized or not. As mthread_init is now a constructor, it also has been set as static, and relevent calls removed from programs using it. Change-Id: I2aa375db557958d2bee9a70d285aabb990c88f00
This commit is contained in:
@@ -19,11 +19,14 @@ SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT
|
||||
. endif
|
||||
.endif
|
||||
|
||||
#LSC MINIX libc depends on libminlib because of minix/malloc-debug.c
|
||||
#LSC MINIX libc depends on
|
||||
# - libminlib because of minix/malloc-debug.c
|
||||
# - libmthread because of sys/lib/libunwind
|
||||
SUBDIR+= libminlib
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= libsys
|
||||
SUBDIR+= libmthread
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= libc
|
||||
@@ -43,7 +46,6 @@ SUBDIR+= libasyn \
|
||||
libinputdriver \
|
||||
libminc \
|
||||
libminixfs \
|
||||
libmthread \
|
||||
libnetdriver \
|
||||
libsffs \
|
||||
libtimers \
|
||||
|
||||
Reference in New Issue
Block a user