wait: Relate wait_event_cmd() to its userspace equivalence
PATCH v2 1/1 wait: Relate wait_event_cmd() to its userspace equivalence
Relate wait_event_cmd() to userspace's pthread_cond_wait(). This because when searching for functionality comparable to pthread_cond_wait(), it is very hard to find wait_event_cmd().
Signed-off-by Håkon Bugge <[email protected]>
--
v1 -> v2:
* Split original patch into two
* Wordsmithing as suggested by Matthew
--- include/linux/wait.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/linux/wait.h +8 -0
@@ -469,6 +469,14 @@ do { \* * wake_up() has to be called after changing any variable that could * change the result of the wait condition. +* +* This is the kernel's polymorphic implementation of userspace's +* pthread_cond_wait(). +* +* When calling this function, cmd1 is typically a lock-release call +* and cmd2 a lock-acquire call. The locking primitive can be chosen, +* contrary to pthread_cond_wait(), where the locking type is cast in +* stone and is a pthread_mutex_t. */ #define wait_event_cmd (wq_head, condition, cmd1, cmd2) \ do { \
Signature · 1 line
2.43.5
Quoted 9 lines · Håkon Bugge
Relate
wait_event_cmd()to userspace'spthread_cond_wait(). This because when searching for functionality comparable topthread_cond_wait(), it is very hard to findwait_event_cmd().Signed-off-by Håkon Bugge <[email protected]>
A gentle ping on this one.
Thxs, Håkon
Quoted 32 lines
--
v1 -> v2:
* Split original patch into two
* Wordsmithing as suggested by Matthew
---include/linux/wait.h| 8 ++++++++1 file changed, 8 insertions(+)include/linux/wait.h +8
-0@@ -469,6 +469,14 @@ do { \* * wake_up() has to be called after changing any variable that could * change the result of the wait condition. +* +* This is the kernel's polymorphic implementation of userspace's +* pthread_cond_wait(). +* +* When calling this function, cmd1 is typically a lock-release call +* and cmd2 a lock-acquire call. The locking primitive can be chosen, +* contrary to pthread_cond_wait(), where the locking type is cast in +* stone and is a pthread_mutex_t. */ #define wait_event_cmd (wq_head, condition, cmd1, cmd2) \ do { \Signature · 1 line
2.43.5