mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 21:04:56 +08:00
Update to FreeBSD head 2017-04-04
Git mirror commit 642b174daddbd0efd9bb5f242c43f4ab4db6869f.
This commit is contained in:
@@ -522,6 +522,23 @@ task_is_running(struct taskqueue *queue, struct task *task)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Only use this function in single threaded contexts. It returns
|
||||
* non-zero if the given task is either pending or running. Else the
|
||||
* task is idle and can be queued again or freed.
|
||||
*/
|
||||
int
|
||||
taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task)
|
||||
{
|
||||
int retval;
|
||||
|
||||
TQ_LOCK(queue);
|
||||
retval = task->ta_pending > 0 || task_is_running(queue, task);
|
||||
TQ_UNLOCK(queue);
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
static int
|
||||
taskqueue_cancel_locked(struct taskqueue *queue, struct task *task,
|
||||
u_int *pendp)
|
||||
|
Reference in New Issue
Block a user