mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-05 05:49:27 +00:00
e5106342c6
_foo - wrapped system call foo - weak definition to _foo and for cancellation points: _foo - wrapped system call __foo - enter cancellation point, call _foo(), leave cancellation point foo - weak definition to __foo Change use of global _thread_run to call a function to get the currently running thread. Make all pthread_foo functions weak definitions to _pthread_foo, where _pthread_foo is the implementation. This allows an application to provide its own pthread functions. Provide slightly different versions of pthread_mutex_lock and pthread_mutex_init so that we can tell the difference between a libc mutex and an application mutex. Threads holding mutexes internal to libc should never be allowed to exit, call signal handlers, or cancel. Approved by: -arch
30 lines
945 B
Makefile
30 lines
945 B
Makefile
# $FreeBSD$
|
|
#
|
|
# All library objects contain rcsid strings by default; they may be
|
|
# excluded as a space-saving measure. To produce a library that does
|
|
# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
|
|
# from CFLAGS below. To remove these strings from just the system call
|
|
# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
|
|
LIB=c_r
|
|
SHLIB_MAJOR= 5
|
|
SHLIB_MINOR= 0
|
|
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/../libc/include
|
|
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
|
|
CFLAGS+=-I${.CURDIR}/../../include
|
|
|
|
# Uncomment this if you want libc_r to contain debug information for
|
|
# thread locking.
|
|
CFLAGS+=-D_LOCK_DEBUG
|
|
|
|
# enable extra internal consistancy checks
|
|
CFLAGS+=-D_PTHREADS_INVARIANTS
|
|
|
|
AINC= -I${.CURDIR}/../libc/${MACHINE_ARCH} -I${.CURDIR}/uthread
|
|
PRECIOUSLIB= yes
|
|
|
|
.include "${.CURDIR}/man/Makefile.inc"
|
|
.include "${.CURDIR}/uthread/Makefile.inc"
|
|
.include "${.CURDIR}/sys/Makefile.inc"
|
|
|
|
.include <bsd.lib.mk>
|