summaryrefslogtreecommitdiffstats
path: root/lib/libkse/Makefile
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-04-21 04:02:56 +0000
committerdeischen <deischen@FreeBSD.org>2003-04-21 04:02:56 +0000
commit7b2d1b3027d1955bcd7071794030c715c6157afa (patch)
treeb1e30482cc9dacf340a49bac7c46ffce02f42daa /lib/libkse/Makefile
parent304876f035aec43b1760b405c77a7f294b73ca0d (diff)
downloadFreeBSD-src-7b2d1b3027d1955bcd7071794030c715c6157afa.zip
FreeBSD-src-7b2d1b3027d1955bcd7071794030c715c6157afa.tar.gz
Add an i386-specifc hack to always set %gs. There still seems
to be instances where the kernel doesn't properly save and/or restore it. Use noupcall and nocompleted flags in the KSE mailbox. These require kernel changes to work which will be committed sometime later. Things still work without the changes. Remove the general kse entry function and use two different functions -- one for scope system threads and one for scope process threads. The scope system function is not yet enabled and we use the same function for all threads at the moment. Keep a copy of the KSE stack for the case that a KSE runs a scope system thread and uses the same stack as the thread (no upcalls are generated, so a separate stack isn't needed). This isn't enabled yet. Use a separate field for the KSE waiting flag. It isn't correct to use the mailbox flags field. The following fixes were provided by David Xu: o Initialize condition variable locks with thread versions of the low-level locking functions instead of the kse versions. o Enable threading before creating the first thread instead of after. o Don't enter critical regions when trying to malloc/free or call functions that malloc/free. o Take the scheduling lock when inheriting thread attributes. o Check the attribute's stack pointer instead of the attributes stack size for null when allocating a thread's stack. o Add a kseg reinit function so we don't have to destroy and then recreate the same lock. o Check the return value of kse_create() and return an appropriate error if it fails. o Don't forget to destroy a thread's locks when freeing it. o Examine the correct flags word for checking to see if a thread is in a synchronization queue. Things should now work on an SMP kernel.
Diffstat (limited to 'lib/libkse/Makefile')
-rw-r--r--lib/libkse/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile
index 4d766b7..d4b88ca 100644
--- a/lib/libkse/Makefile
+++ b/lib/libkse/Makefile
@@ -17,7 +17,12 @@ CFLAGS+=-I${.CURDIR}/sys
# Uncomment this if you want libpthread to contain debug information for
# thread locking.
-#CFLAGS+=-D_LOCK_DEBUG -g
+CFLAGS+=-D_LOCK_DEBUG
+#CFLAGS+= -g
+
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS+=-DGS_HACK
+.endif
# enable extra internal consistancy checks
CFLAGS+=-D_PTHREADS_INVARIANTS -Wall
OpenPOWER on IntegriCloud