Browse Source

support of loading of dynamic libraries what depends on pthread

Alexander Shiryaev 12 năm trước cách đây
mục cha
commit
fbc3a146a8

+ 1 - 0
BlackBox/Lin/Mod/Obsd.Libc.txt

@@ -66,6 +66,7 @@ MODULE LinLibc ["libc.so.66.0"];
 		SIGUSR1* = 30; (* user defined signal 1 *)
 		SIGUSR2* = 31; (* user defined signal 2 *)
 		SIGWINCH* = 28; (* window size changes *)
+		SIGTHR* = 32; (* thread library AST *)
 
 
 		(* Bits in `sa_flags'.  *)

BIN
BlackBox/Lin/Mod/Obsd.linKernel.odc


+ 1 - 0
BlackBox/Lin/Mod/Obsd.linKernel.txt

@@ -2474,6 +2474,7 @@ L1:
 			IF (i # LinLibc.SIGKILL)
 				& (i # LinLibc.SIGSTOP)
 				& (i # LinLibc.SIGWINCH)
+				& (i # LinLibc.SIGTHR) (* A. V. Shiryaev: OpenBSD -pthread *)
 			THEN
 				IF LinLibc.sigaction(i, sa, old) # 0 THEN Msg("failed to install signal"); Int(i) END;
 			END

BIN
BlackBox/libBB.so


+ 2 - 0
README

@@ -44,6 +44,8 @@ Files:
 					CLOCKS_PER_SEC related
 				Kernel.InitModule
 					mprotect added
+				Kernel.InstallSignals:
+					do not install signal handler for SIGTHR (when executable linked with -pthread)
 		Lin/Mod/Obsd.linHostFiles.odc:
 			OpenBUGS Lin/Mod/linHostFiles.odc: 
 				size_t specific

+ 1 - 1
c/Makefile

@@ -1,7 +1,7 @@
 all: lindev BlackBox
 
 BlackBox: BlackBox.c
-	${CC} ${CFLAGS} -O0 -g -o ${.TARGET} ${.ALLSRC} -L. -lBB -Wl,-E
+	${CC} ${CFLAGS} -O0 -g -o ${.TARGET} ${.ALLSRC} -L. -lBB -Wl,-E -pthread
 
 lindev: BlackBox1.c
 	${CC} ${CFLAGS} -O0 -g -o ${.TARGET} ${.ALLSRC} -L . -lBB0