summaryrefslogtreecommitdiffstats
path: root/lib/libthr/support
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-04-23 02:48:59 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-04-23 02:48:59 +0000
commita0a25ee25d1bd296e898cd72e97a736762e337fb (patch)
treefc6ceaa51d3f3fe51b63513464e70773a113f55f /lib/libthr/support
parenta247de6aebd4d9d6b2f57c62384130583abcd925 (diff)
downloadFreeBSD-src-a0a25ee25d1bd296e898cd72e97a736762e337fb.zip
FreeBSD-src-a0a25ee25d1bd296e898cd72e97a736762e337fb.tar.gz
Use thr_new syscall to create a new thread, obscure context operations
is no longer needed.
Diffstat (limited to 'lib/libthr/support')
-rw-r--r--lib/libthr/support/Makefile.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libthr/support/Makefile.inc b/lib/libthr/support/Makefile.inc
new file mode 100644
index 0000000..bcf4393
--- /dev/null
+++ b/lib/libthr/support/Makefile.inc
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
+.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
+
+CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
+
+SYSCALLS= thr_new
+
+SYSCALL_SRC= ${SYSCALLS:S/$/.S/}
+SYSCALL_OBJ= ${SYSCALLS:S/$/.So/}
+
+${SYSCALL_SRC}:
+ printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
+
+LIBC_OBJS=
+
+SOBJS+= thr_libc.So
+CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
+
+thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS}
+ ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}
OpenPOWER on IntegriCloud