diff options
author | mtm <mtm@FreeBSD.org> | 2004-03-28 14:05:28 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2004-03-28 14:05:28 +0000 |
commit | c715901410e98c7b0c336278828765e4285964d3 (patch) | |
tree | c847bc30278d22c01ea70ac7fbb7c69dc9831151 /lib/libthr/thread/thr_create.c | |
parent | 1425c998a18db105fcdc560157ebc5bb857ab2e6 (diff) | |
download | FreeBSD-src-c715901410e98c7b0c336278828765e4285964d3.zip FreeBSD-src-c715901410e98c7b0c336278828765e4285964d3.tar.gz |
Remove the garbage collector thread. All resources are freed
in-line. If the exiting thread cannot release a resource, then
the next thread to exit will release it.
Diffstat (limited to 'lib/libthr/thread/thr_create.c')
-rw-r--r-- | lib/libthr/thread/thr_create.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 32ca697..5f1887d 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -62,9 +62,7 @@ int _pthread_create(pthread_t * thread, const pthread_attr_t * attr, void *(*start_routine) (void *), void *arg) { - int f_gc = 0; int ret = 0; - pthread_t gc_thread; pthread_t new_thread; pthread_attr_t pattr; int flags; @@ -148,12 +146,6 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, THREAD_LIST_LOCK; - /* - * Check if the garbage collector thread - * needs to be started. - */ - f_gc = (TAILQ_FIRST(&_thread_list) == _thread_initial); - /* Add the thread to the linked list of all threads: */ TAILQ_INSERT_HEAD(&_thread_list, new_thread, tle); @@ -180,13 +172,6 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, /* Return a pointer to the thread structure: */ (*thread) = new_thread; - /* - * Start a garbage collector thread - * if necessary. - */ - if (f_gc && pthread_create(&gc_thread,NULL, _thread_gc,NULL) != 0) - PANIC("Can't create gc thread"); - return (0); } |