diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-07-03 18:02:33 +0200 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-07-03 18:02:33 +0200 |
commit | 45289bf6ac70b106f5000d10b040e4485dd3e9d5 (patch) | |
tree | b01499ed66e27d512b9c573bbd2a5fd78d761f1c /drivers/ieee1394/raw1394-private.h | |
parent | [PATCH] ieee1394: dv1394: sem2mutex conversion (diff) | |
download | linux-45289bf6ac70b106f5000d10b040e4485dd3e9d5.tar.xz linux-45289bf6ac70b106f5000d10b040e4485dd3e9d5.zip |
[PATCH] ieee1394: raw1394: remove redundant counting semaphore
An already existing wait queue replaces raw1394's complete_sem which was
maintained in parallel to the wait queue. The role of the semaphore's
counter is taken over by a direct check of what was really counted: The
presence of items in the list of completed requests.
Notes:
- raw1394_release() sleeps uninterruptibly until all requests were
completed. This is the same behaviour as before the patch.
- The macros wait_event and wait_event_interruptible are called with a
condition argument which has a side effect, i.e. manipulation of the
requests list. This side effect happens only if the condition is
true. The patch relies on the fact that wait_event[_interruptible]
does not evaluate the condition again after it became true.
- The diffstat looks unfavorable with respect to added lines of code.
However 19 of them are comments, and some are due to separation of
existing code blocks into two small helper functions.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394/raw1394-private.h')
-rw-r--r-- | drivers/ieee1394/raw1394-private.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ieee1394/raw1394-private.h b/drivers/ieee1394/raw1394-private.h index c93587be9cab..c7731d1bcd89 100644 --- a/drivers/ieee1394/raw1394-private.h +++ b/drivers/ieee1394/raw1394-private.h @@ -29,9 +29,8 @@ struct file_info { struct list_head req_pending; struct list_head req_complete; - struct semaphore complete_sem; spinlock_t reqlists_lock; - wait_queue_head_t poll_wait_complete; + wait_queue_head_t wait_complete; struct list_head addr_list; |