Added a constant and modified our Makefile to enable C++ thread support when building GCC. Rebuild your toolchain.
Signed-off-by: Dan Cross <[email protected]> --- tools/compilers/gcc-glibc/Makefile | 4 ++-- user/pthread/pthread.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/compilers/gcc-glibc/Makefile b/tools/compilers/gcc-glibc/Makefile index 41f4f8b..7f7857a 100644 --- a/tools/compilers/gcc-glibc/Makefile +++ b/tools/compilers/gcc-glibc/Makefile @@ -643,7 +643,7 @@ native-gcc-stage3-configure: native-gcc-stage3-prep --with-isl=no \ --with-cloog=no \ --with-libelf=no \ - --enable-threads=no \ + --enable-threads=posix \ --enable-tls \ --disable-nls \ --disable-multilib \ @@ -675,7 +675,7 @@ cross-gcc-stage3-configure: --with-isl=no \ --with-cloog=no \ --with-libelf=no \ - --enable-threads=no \ + --enable-threads=posix \ --disable-nls \ --disable-multilib \ --with-local-prefix=$(SYSROOT) \ diff --git a/user/pthread/pthread.h b/user/pthread/pthread.h index 73ca3d4..a98df07 100644 --- a/user/pthread/pthread.h +++ b/user/pthread/pthread.h @@ -71,6 +71,7 @@ struct sysc_mgmt { #define PTHREAD_MUTEX_INITIALIZER {0,0} #define PTHREAD_RWLOCK_INITIALIZER PTHREAD_MUTEX_INITIALIZER #define PTHREAD_MUTEX_NORMAL 0 +#define PTHREAD_MUTEX_RECURSIVE 1 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL #define PTHREAD_MUTEX_SPINS 100 // totally arbitrary #define PTHREAD_BARRIER_SPINS 100 // totally arbitrary -- 2.8.0.rc3.226.g39d4020 -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
