1 |
/* thread.c - Manage threads. |
/* thread.c - Manage threads. |
2 |
Copyright (C) 2004 Free Software Foundation, Inc. |
Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
3 |
Written by Marcus Brinkmann. |
Written by Marcus Brinkmann. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
49 |
place where we keep track of used and free thread IDs, it must |
place where we keep track of used and free thread IDs, it must |
50 |
never be reaped (so no destructor is needed). */ |
never be reaped (so no destructor is needed). */ |
51 |
static struct hurd_slab_space threads |
static struct hurd_slab_space threads |
52 |
= HURD_SLAB_SPACE_INITIALIZER (struct thread, thread_constructor, |
= HURD_SLAB_SPACE_INITIALIZER (struct thread, NULL, NULL, |
53 |
NULL, NULL); |
thread_constructor, NULL, NULL); |
54 |
|
|
55 |
/* The lock protecting the threads slab. */ |
/* The lock protecting the threads slab. */ |
56 |
static pthread_mutex_t threads_lock = PTHREAD_MUTEX_INITIALIZER; |
static pthread_mutex_t threads_lock = PTHREAD_MUTEX_INITIALIZER; |