128 |
{ |
{ |
129 |
error_t err = 0; |
error_t err = 0; |
130 |
hurd_cap_bucket_t bucket = ctx->bucket; |
hurd_cap_bucket_t bucket = ctx->bucket; |
|
l4_thread_id_t from = ctx->from; |
|
131 |
_hurd_cap_client_t client; |
_hurd_cap_client_t client; |
132 |
hurd_cap_handle_t cap; |
hurd_cap_handle_t cap; |
133 |
hurd_cap_class_t cap_class; |
hurd_cap_class_t cap_class; |
554 |
} |
} |
555 |
else |
else |
556 |
{ |
{ |
|
bool demuxed = false; |
|
|
|
|
557 |
_hurd_cap_list_item_add (inhibited ? &bucket->waiting_rpcs |
_hurd_cap_list_item_add (inhibited ? &bucket->waiting_rpcs |
558 |
: &bucket->pending_rpcs, worker); |
: &bucket->pending_rpcs, worker); |
559 |
pthread_mutex_unlock (&bucket->lock); |
pthread_mutex_unlock (&bucket->lock); |
822 |
{ |
{ |
823 |
l4_thread_id_t worker = l4_nilthread; |
l4_thread_id_t worker = l4_nilthread; |
824 |
pthread_t worker_thread; |
pthread_t worker_thread; |
|
_hurd_cap_list_item_t worker_item; |
|
825 |
|
|
826 |
pthread_mutex_unlock (&bucket->lock); |
pthread_mutex_unlock (&bucket->lock); |
827 |
|
|
838 |
pthread_detach (worker_thread); |
pthread_detach (worker_thread); |
839 |
|
|
840 |
pthread_mutex_lock (&bucket->lock); |
pthread_mutex_lock (&bucket->lock); |
841 |
bucket->worker_alloc_state == _HURD_CAP_STATE_YELLOW; |
bucket->worker_alloc_state = _HURD_CAP_STATE_YELLOW; |
842 |
/* We ignore any error, as the only error that can occur |
/* We ignore any error, as the only error that can occur |
843 |
is ECANCELED, and only if the bucket state goes to |
is ECANCELED, and only if the bucket state goes to |
844 |
black for shutdown. But particularly in that case we |
black for shutdown. But particularly in that case we |
854 |
else |
else |
855 |
{ |
{ |
856 |
pthread_mutex_lock (&bucket->lock); |
pthread_mutex_lock (&bucket->lock); |
857 |
bucket->worker_alloc_state == _HURD_CAP_STATE_RED; |
bucket->worker_alloc_state = _HURD_CAP_STATE_RED; |
858 |
} |
} |
859 |
|
|
860 |
if (bucket->state == _HURD_CAP_STATE_BLACK) |
if (bucket->state == _HURD_CAP_STATE_BLACK) |
862 |
} |
} |
863 |
} |
} |
864 |
|
|
865 |
bucket->worker_alloc_state == _HURD_CAP_STATE_BLACK; |
bucket->worker_alloc_state = _HURD_CAP_STATE_BLACK; |
866 |
pthread_mutex_unlock (&bucket->lock); |
pthread_mutex_unlock (&bucket->lock); |
867 |
|
|
868 |
return NULL; |
return NULL; |