diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-04-02 08:33:42 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-04-02 08:33:42 +0000 |
commit | aa2019ec007907a475ce729885d3253520cef345 (patch) | |
tree | 45447801c21e76f2de9627d9d0a860d664cdc7f0 /lib/libthr | |
parent | 570834290dca75d4044e973157f19c9f8dcc70d6 (diff) | |
download | FreeBSD-src-aa2019ec007907a475ce729885d3253520cef345.zip FreeBSD-src-aa2019ec007907a475ce729885d3253520cef345.tar.gz |
Remove unused functions.
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/thread/thr_cond.c | 53 | ||||
-rw-r--r-- | lib/libthr/thread/thr_private.h | 2 |
2 files changed, 0 insertions, 55 deletions
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c index ac8035a..85eecaa 100644 --- a/lib/libthr/thread/thr_cond.c +++ b/lib/libthr/thread/thr_cond.c @@ -290,56 +290,3 @@ _pthread_cond_broadcast(pthread_cond_t * cond) return (cond_signal_common(cond, 1)); } - -int -_pthread_cond_wait_unlocked(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime) -{ - struct pthread *curthread = _get_curthread(); - struct timespec ts, ts2, *tsp; - pthread_cond_t cv; - int ret; - - cv = *cond; - THR_UMUTEX_LOCK(curthread, &cv->c_lock); - _pthread_mutex_unlock(mutex); - - if (abstime != NULL) { - clock_gettime(cv->c_clockid, &ts); - TIMESPEC_SUB(&ts2, abstime, &ts); - tsp = &ts2; - } else - tsp = NULL; - - ret = _thr_ucond_wait(&cv->c_kerncv, &cv->c_lock, tsp, 0); - if (ret == EINTR) - ret = 0; - return (ret); -} - -int -_pthread_cond_broadcast_unlock(pthread_cond_t *cond, pthread_mutex_t *mutex, int broadcast) -{ - struct pthread *curthread = _get_curthread(); - pthread_cond_t cv; - int ret = 0; - - /* - * If the condition variable is statically initialized, perform dynamic - * initialization. - */ - if (__predict_false(*cond == NULL && - (ret = init_static(curthread, cond)) != 0)) - return (ret); - - cv = *cond; - THR_UMUTEX_LOCK(curthread, &cv->c_lock); - _pthread_mutex_unlock(mutex); - if (!broadcast) - ret = _thr_ucond_signal(&cv->c_kerncv); - else - ret = _thr_ucond_broadcast(&cv->c_kerncv); - THR_UMUTEX_UNLOCK(curthread, &cv->c_lock); - return (ret); -} - diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index e377c5b..95affc1 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -670,8 +670,6 @@ void _thread_bp_death(void); int _sched_yield(void); int _pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); int _pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *); -int _pthread_cond_wait_unlocked(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) __hidden; -int _pthread_cond_broadcast_unlock(pthread_cond_t *, pthread_mutex_t *, int broadcast); /* #include <fcntl.h> */ #ifdef _SYS_FCNTL_H_ |