diff options
author | obrien <obrien@FreeBSD.org> | 2007-10-09 13:42:34 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2007-10-09 13:42:34 +0000 |
commit | eb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98 (patch) | |
tree | c47a609d11ee2b49fc8234ffe6ee4e508318db84 /lib/libkse | |
parent | 8e21b1f738e3a7d52ec50aa5730787013a76a4d5 (diff) | |
download | FreeBSD-src-eb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98.zip FreeBSD-src-eb3f6a9e7473ee9d6e8016ce8d9cc1e8286bdd98.tar.gz |
Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by: re(kensmith)
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/Makefile | 10 | ||||
-rw-r--r-- | lib/libkse/kse.map | 368 | ||||
-rw-r--r-- | lib/libkse/test/guard_b.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/hello_d.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/join_leak_d.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/mutex_d.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/sem_d.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/sigsuspend_d.exp | 1 | ||||
-rw-r--r-- | lib/libkse/test/sigwait_d.exp | 1 |
9 files changed, 380 insertions, 5 deletions
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile index ed80d75..7c7f8f2 100644 --- a/lib/libkse/Makefile +++ b/lib/libkse/Makefile @@ -10,13 +10,13 @@ .include <bsd.own.mk> -.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \ +.if (${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no") && \ ${SHLIBDIR} == "/usr/lib" SHLIBDIR= /lib .endif LIB=kse -SHLIB_MAJOR= 3 +SHLIB_MAJOR= 0 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ -I${.CURDIR}/../../include @@ -26,7 +26,7 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} CFLAGS+=-fno-builtin -# Uncomment this if you want libpthread to contain debug information for +# Uncomment this if you want libkse to contain debug information for # thread locking. CFLAGS+=-D_LOCK_DEBUG WARNS?=2 @@ -38,7 +38,7 @@ WARNS?=2 # Enable extra internal consistancy checks. CFLAGS+=-D_PTHREADS_INVARIANTS -Wall -VERSION_MAP=${.CURDIR}/pthread.map +VERSION_MAP=${.CURDIR}/kse.map PRECIOUSLIB= @@ -47,7 +47,7 @@ PRECIOUSLIB= .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no" +.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no" SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a .if !defined(NO_PIC) SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so diff --git a/lib/libkse/kse.map b/lib/libkse/kse.map new file mode 100644 index 0000000..e8888df --- /dev/null +++ b/lib/libkse/kse.map @@ -0,0 +1,368 @@ +/* $FreeBSD$ */ + +/* + * Use the same naming scheme as libc. + */ +FBSD_1.0 { +global: + __error; + accept; + aio_suspend; + close; + connect; + creat; + execve; + fcntl; + fork; + fsync; + msync; + nanosleep; + open; + pause; + poll; + pselect; + pthread_atfork; + pthread_barrier_destroy; + pthread_barrier_init; + pthread_barrier_wait; + pthread_barrierattr_destroy; + pthread_barrierattr_getpshared; + pthread_barrierattr_init; + pthread_barrierattr_setpshared; + pthread_attr_destroy; + pthread_attr_get_np; + pthread_attr_getdetachstate; + pthread_attr_getguardsize; + pthread_attr_getinheritsched; + pthread_attr_getschedparam; + pthread_attr_getschedpolicy; + pthread_attr_getscope; + pthread_attr_getstack; + pthread_attr_getstackaddr; + pthread_attr_getstacksize; + pthread_attr_init; + pthread_attr_setcreatesuspend_np; + pthread_attr_setdetachstate; + pthread_attr_setguardsize; + pthread_attr_setinheritsched; + pthread_attr_setschedparam; + pthread_attr_setschedpolicy; + pthread_attr_setscope; + pthread_attr_setstack; + pthread_attr_setstackaddr; + pthread_attr_setstacksize; + pthread_cancel; + pthread_cleanup_pop; + pthread_cleanup_push; + pthread_cond_broadcast; + pthread_cond_destroy; + pthread_cond_init; + pthread_cond_signal; + pthread_cond_timedwait; + pthread_cond_wait; + pthread_condattr_destroy; + pthread_condattr_init; + pthread_create; + pthread_detach; + pthread_equal; + pthread_exit; + pthread_getconcurrency; + pthread_getprio; + pthread_getschedparam; + pthread_getspecific; + pthread_join; + pthread_key_create; + pthread_key_delete; + pthread_kill; + pthread_main_np; + pthread_multi_np; + pthread_mutex_destroy; + pthread_mutex_getprioceiling; + pthread_mutex_init; + pthread_mutex_lock; + pthread_mutex_setprioceiling; + pthread_mutex_timedlock; + pthread_mutex_trylock; + pthread_mutex_unlock; + pthread_mutexattr_destroy; + pthread_mutexattr_getkind_np; + pthread_mutexattr_getprioceiling; + pthread_mutexattr_getprotocol; + pthread_mutexattr_gettype; + pthread_mutexattr_init; + pthread_mutexattr_setkind_np; + pthread_mutexattr_setprioceiling; + pthread_mutexattr_setprotocol; + pthread_mutexattr_settype; + pthread_once; + pthread_resume_all_np; + pthread_resume_np; + pthread_rwlock_destroy; + pthread_rwlock_init; + pthread_rwlock_rdlock; + pthread_rwlock_timedrdlock; + pthread_rwlock_timedwrlock; + pthread_rwlock_tryrdlock; + pthread_rwlock_trywrlock; + pthread_rwlock_unlock; + pthread_rwlock_wrlock; + pthread_rwlockattr_destroy; + pthread_rwlockattr_getpshared; + pthread_rwlockattr_init; + pthread_rwlockattr_setpshared; + pthread_self; + pthread_set_name_np; + pthread_setcancelstate; + pthread_setcanceltype; + pthread_setconcurrency; + pthread_setprio; + pthread_setschedparam; + pthread_setspecific; + pthread_sigmask; + pthread_single_np; + pthread_spin_destroy; + pthread_spin_init; + pthread_spin_lock; + pthread_spin_trylock; + pthread_spin_unlock; + pthread_suspend_all_np; + pthread_suspend_np; + pthread_switch_add_np; + pthread_switch_delete_np; + pthread_testcancel; + pthread_yield; + raise; + read; + readv; + sched_yield; + select; + sem_init; + sem_post; + sem_timedwait; + sem_wait; + sigaction; + sigaltstack; + sigpending; + sigprocmask; + sigsuspend; + sigwait; + sigwaitinfo; + sigtimedwait; + sleep; + system; + tcdrain; + usleep; + vfork; + wait4; + wait; + waitpid; + write; + writev; +local: + *; +}; + +/* + * List the private interfaces reserved for use in FreeBSD libraries. + * These are not part of our application ABI. + */ +FBSDprivate_1.0 { +global: + ___creat; + __accept; + __close; + __connect; + __fcntl; + __fsync; + __msync; + __nanosleep; + __open; + __poll; + __pthread_cond_timedwait; + __pthread_cond_wait; + __pthread_mutex_init; + __pthread_mutex_lock; + __pthread_mutex_trylock; + __pthread_mutex_timedlock; + __read; + __readv; + __select; + __sigsuspend; + __sigtimedwait; + __sigwait; + __sigwaitinfo; + __wait4; + __write; + __writev; + _aio_suspend; + _execve; + _fork; + _nanosleep; + _pause; + _pselect; + _pthread_atfork; + _pthread_barrier_destroy; + _pthread_barrier_init; + _pthread_barrier_wait; + _pthread_barrierattr_destroy; + _pthread_barrierattr_getpshared; + _pthread_barrierattr_init; + _pthread_barrierattr_setpshared; + _pthread_attr_destroy; + _pthread_attr_get_np; + _pthread_attr_getdetachstate; + _pthread_attr_getguardsize; + _pthread_attr_getinheritsched; + _pthread_attr_getschedparam; + _pthread_attr_getschedpolicy; + _pthread_attr_getscope; + _pthread_attr_getstack; + _pthread_attr_getstackaddr; + _pthread_attr_getstacksize; + _pthread_attr_init; + _pthread_attr_setcreatesuspend_np; + _pthread_attr_setdetachstate; + _pthread_attr_setguardsize; + _pthread_attr_setinheritsched; + _pthread_attr_setschedparam; + _pthread_attr_setschedpolicy; + _pthread_attr_setscope; + _pthread_attr_setstack; + _pthread_attr_setstackaddr; + _pthread_attr_setstacksize; + _pthread_cancel; + _pthread_cleanup_pop; + _pthread_cleanup_push; + _pthread_cond_broadcast; + _pthread_cond_destroy; + _pthread_cond_init; + _pthread_cond_signal; + _pthread_cond_timedwait; + _pthread_cond_wait; + _pthread_condattr_default; + _pthread_condattr_destroy; + _pthread_condattr_init; + _pthread_create; + _pthread_detach; + _pthread_equal; + _pthread_exit; + _pthread_getconcurrency; + _pthread_getprio; + _pthread_getschedparam; + _pthread_getspecific; + _pthread_join; + _pthread_key_create; + _pthread_key_delete; + _pthread_kill; + _pthread_main_np; + _pthread_multi_np; + _pthread_mutex_destroy; + _pthread_mutex_getprioceiling; + _pthread_mutex_init; + _pthread_mutex_lock; + _pthread_mutex_setprioceiling; + _pthread_mutex_timedlock; + _pthread_mutex_trylock; + _pthread_mutex_unlock; + _pthread_mutexattr_default; + _pthread_mutexattr_destroy; + _pthread_mutexattr_getkind_np; + _pthread_mutexattr_getprioceiling; + _pthread_mutexattr_getprotocol; + _pthread_mutexattr_gettype; + _pthread_mutexattr_init; + _pthread_mutexattr_setkind_np; + _pthread_mutexattr_setprioceiling; + _pthread_mutexattr_setprotocol; + _pthread_mutexattr_settype; + _pthread_once; + _pthread_resume_all_np; + _pthread_resume_np; + _pthread_rwlock_destroy; + _pthread_rwlock_init; + _pthread_rwlock_rdlock; + _pthread_rwlock_timedrdlock; + _pthread_rwlock_timedwrlock; + _pthread_rwlock_tryrdlock; + _pthread_rwlock_trywrlock; + _pthread_rwlock_unlock; + _pthread_rwlock_wrlock; + _pthread_rwlockattr_destroy; + _pthread_rwlockattr_getpshared; + _pthread_rwlockattr_init; + _pthread_rwlockattr_setpshared; + _pthread_self; + _pthread_set_name_np; + _pthread_setcancelstate; + _pthread_setcanceltype; + _pthread_setconcurrency; + _pthread_setprio; + _pthread_setschedparam; + _pthread_setspecific; + _pthread_sigmask; + _pthread_single_np; + _pthread_spin_destroy; + _pthread_spin_init; + _pthread_spin_lock; + _pthread_spin_trylock; + _pthread_spin_unlock; + _pthread_suspend_all_np; + _pthread_suspend_np; + _pthread_switch_add_np; + _pthread_switch_delete_np; + _pthread_testcancel; + _pthread_yield; + _raise; + _sched_yield; + _sem_init; + _sem_post; + _sem_timedwait; + _sem_wait; + _sigaction; + _sigaltstack; + _sigpending; + _sigprocmask; + _sigsuspend; + _sigtimedwait; + _sigwait; + _sigwaitinfo; + _sleep; + _spinlock; + _spinlock_debug; + _spinunlock; + _system; + _tcdrain; + _usleep; + _vfork; + _wait; + _waitpid; + + /* Debugger needs these. */ + _libkse_debug; + _thread_activated; + _thread_active_threads; + _thread_keytable; + _thread_list; + _thread_max_keys; + _thread_off_attr_flags; + _thread_off_dtv; + _thread_off_linkmap; + _thread_off_next; + _thread_off_tcb; + _thread_off_tmbx; + _thread_off_key_allocated; + _thread_off_key_destructor; + _thread_off_kse; + _thread_off_kse_locklevel; + _thread_off_sigmask; + _thread_off_sigpend; + _thread_off_state; + _thread_off_thr_locklevel; + _thread_off_tlsindex; + _thread_size_key; + _thread_state_running; + _thread_state_zoombie; + +local: + *; +}; diff --git a/lib/libkse/test/guard_b.exp b/lib/libkse/test/guard_b.exp index 8e5b9e4..cc67470 100644 --- a/lib/libkse/test/guard_b.exp +++ b/lib/libkse/test/guard_b.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Test begin No overflow: Overflow: diff --git a/lib/libkse/test/hello_d.exp b/lib/libkse/test/hello_d.exp index 802992c..47be080 100644 --- a/lib/libkse/test/hello_d.exp +++ b/lib/libkse/test/hello_d.exp @@ -1 +1,2 @@ +# $FreeBSD$ Hello world diff --git a/lib/libkse/test/join_leak_d.exp b/lib/libkse/test/join_leak_d.exp index 369a88d..a54de72 100644 --- a/lib/libkse/test/join_leak_d.exp +++ b/lib/libkse/test/join_leak_d.exp @@ -1,2 +1,3 @@ +# $FreeBSD$ Test begin Test end diff --git a/lib/libkse/test/mutex_d.exp b/lib/libkse/test/mutex_d.exp index de8a4e4..dd2f7bd 100644 --- a/lib/libkse/test/mutex_d.exp +++ b/lib/libkse/test/mutex_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Testing pthread_mutex_init -------------------------- diff --git a/lib/libkse/test/sem_d.exp b/lib/libkse/test/sem_d.exp index b0de3da..cd86f12 100644 --- a/lib/libkse/test/sem_d.exp +++ b/lib/libkse/test/sem_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Test begin Got semaphore Got semaphore diff --git a/lib/libkse/test/sigsuspend_d.exp b/lib/libkse/test/sigsuspend_d.exp index 901fa50..03c9a72 100644 --- a/lib/libkse/test/sigsuspend_d.exp +++ b/lib/libkse/test/sigsuspend_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ -> Suspender thread signal handler caught signal 16 Sigsuspend woke up by signal 16 -> Suspender thread signal handler caught signal 16 diff --git a/lib/libkse/test/sigwait_d.exp b/lib/libkse/test/sigwait_d.exp index 2e9b2c4..b9245be 100644 --- a/lib/libkse/test/sigwait_d.exp +++ b/lib/libkse/test/sigwait_d.exp @@ -1,3 +1,4 @@ +# $FreeBSD$ Sigwait caught signal 16 Sigwait caught signal 16 Sigwait caught signal 30 |