Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/workqueue.c

    r63e27ef rb7fd2a0  
    3838
    3939#include <assert.h>
     40#include <errno.h>
    4041#include <synch/workqueue.h>
    4142#include <synch/spinlock.h>
     
    256257 * workq_stop().
    257258 */
    258 int workq_init(struct work_queue *workq, const char *name)
     259bool workq_init(struct work_queue *workq, const char *name)
    259260{
    260261        workq_preinit(workq, name);
     
    394395 * See workq_enqueue_noblock() for more details.
    395396 */
    396 int workq_global_enqueue_noblock(work_t *work_item, work_func_t func)
     397bool workq_global_enqueue_noblock(work_t *work_item, work_func_t func)
    397398{
    398399        return workq_enqueue_noblock(&g_work_queue, work_item, func);
     
    403404 * See workq_enqueue() for more details.
    404405 */
    405 int workq_global_enqueue(work_t *work_item, work_func_t func)
     406bool workq_global_enqueue(work_t *work_item, work_func_t func)
    406407{
    407408        return workq_enqueue(&g_work_queue, work_item, func);
     
    426427 * @return true  Otherwise. func() will be invoked in a separate thread.
    427428 */
    428 int workq_enqueue_noblock(struct work_queue *workq, work_t *work_item,
     429bool workq_enqueue_noblock(struct work_queue *workq, work_t *work_item,
    429430        work_func_t func)
    430431{
     
    446447 * @return true  Otherwise. func() will be invoked in a separate thread.
    447448 */
    448 int workq_enqueue(struct work_queue *workq, work_t *work_item, work_func_t func)
     449bool workq_enqueue(struct work_queue *workq, work_t *work_item, work_func_t func)
    449450{
    450451        return _workq_enqueue(workq, work_item, func, true);
     
    894895       
    895896        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,
    897898                        &info->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
    898899               
    899                 stop = (ret == ESYNCH_INTERRUPTED);
     900                stop = (ret == EINTR);
    900901        }
    901902       
Note: See TracChangeset for help on using the changeset viewer.