Changes in kernel/generic/src/synch/workqueue.c [63e27ef:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/workqueue.c
r63e27ef rb7fd2a0 38 38 39 39 #include <assert.h> 40 #include <errno.h> 40 41 #include <synch/workqueue.h> 41 42 #include <synch/spinlock.h> … … 256 257 * workq_stop(). 257 258 */ 258 intworkq_init(struct work_queue *workq, const char *name)259 bool workq_init(struct work_queue *workq, const char *name) 259 260 { 260 261 workq_preinit(workq, name); … … 394 395 * See workq_enqueue_noblock() for more details. 395 396 */ 396 intworkq_global_enqueue_noblock(work_t *work_item, work_func_t func)397 bool workq_global_enqueue_noblock(work_t *work_item, work_func_t func) 397 398 { 398 399 return workq_enqueue_noblock(&g_work_queue, work_item, func); … … 403 404 * See workq_enqueue() for more details. 404 405 */ 405 intworkq_global_enqueue(work_t *work_item, work_func_t func)406 bool workq_global_enqueue(work_t *work_item, work_func_t func) 406 407 { 407 408 return workq_enqueue(&g_work_queue, work_item, func); … … 426 427 * @return true Otherwise. func() will be invoked in a separate thread. 427 428 */ 428 intworkq_enqueue_noblock(struct work_queue *workq, work_t *work_item,429 bool workq_enqueue_noblock(struct work_queue *workq, work_t *work_item, 429 430 work_func_t func) 430 431 { … … 446 447 * @return true Otherwise. func() will be invoked in a separate thread. 447 448 */ 448 intworkq_enqueue(struct work_queue *workq, work_t *work_item, work_func_t func)449 bool workq_enqueue(struct work_queue *workq, work_t *work_item, work_func_t func) 449 450 { 450 451 return _workq_enqueue(workq, work_item, func, true); … … 894 895 895 896 while (list_empty(&info->work_queues) && !stop) { 896 int ret = _condvar_wait_timeout_irq_spinlock(&info->req_cv,897 errno_t ret = _condvar_wait_timeout_irq_spinlock(&info->req_cv, 897 898 &info->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE); 898 899 899 stop = (ret == E SYNCH_INTERRUPTED);900 stop = (ret == EINTR); 900 901 } 901 902
Note:
See TracChangeset
for help on using the changeset viewer.