diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 19:10:53 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 19:10:53 +0100 |
commit | 31ba99d304494cb28fa8671ccc769c5543e1165d (patch) | |
tree | ea2d839fb70798cf6a3b55ccc87f749e14e14f1d /include/drm/savage_drm.h | |
parent | SLOW_WORK: Allow the work items to be viewed through a /proc file (diff) | |
download | linux-31ba99d304494cb28fa8671ccc769c5543e1165d.tar.xz linux-31ba99d304494cb28fa8671ccc769c5543e1165d.zip |
SLOW_WORK: Allow the owner of a work item to determine if it is queued or not
Add a function (slow_work_is_queued()) to permit the owner of a work item to
determine if the item is queued or not.
The work item is counted as being queued if it is actually on the queue, not
just if it is pending. If it is executing and pending, then it is not on the
queue, but will rather be put back on the queue when execution finishes.
This permits a caller to quickly work out if it may be able to put another,
dependent work item on the queue behind it, or whether it will have to wait
till that is finished.
This can be used by CacheFiles to work out whether the creation a new object
can be immediately deferred when it has to wait for an old object to be
deleted, or whether a wait must take place. If a wait is necessary, then the
slow-work thread can otherwise get blocked, preventing the deletion from
taking place.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/drm/savage_drm.h')
0 files changed, 0 insertions, 0 deletions