Skip to contentSkip to conversation

rtmutex: document rt_mutex_adjust_prio_chain()

PATCH New Juri Lelli 2 participants 2 messages May 15, 2013 – May 28, 2013

lore
Share & tools
lore

Juri Lelli

author
#0 lore raw

PATCH 1/1 rtmutex: document rt_mutex_adjust_prio_chain()

Parameters and usage of rt_mutex_adjust_prio_chain() are already documented in Documentation/rt-mutex-design.txt. However, since this function is called from several paths with different semantics (related to the arguments), it is handy to have a quick reference directly in the code.

Cc Ingo Molnar <[email protected]>
Cc Clark Williams <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 kernel/rtmutex.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
kernel/rtmutex.c +13 -0
index 1e09308..0dd6aec 100644
@@ -145,6 +145,19 @@ int max_lock_depth = 1024;
 /*
  * Adjust the priority chain. Also used for deadlock detection.
  * Decreases task's usage by one - may thus free the task.
+ *
+ * @task: the task owning the mutex (owner) for which a chain walk is probably
+ *	  needed
+ * @deadlock_detect: do we have to carry out deadlock detection?
+ * @orig_lock: the mutex (can be NULL if we are walking the chain to recheck
+ * 	       things for a task that has just got its priority adjusted, and
+ *	       is waiting on a mutex)
+ * @orig_waiter: rt_mutex_waiter struct for the task that has just donated
+ *		 its priority to the mutex owner (can be NULL in the case
+ *		 depicted above or if the top waiter is gone away and we are
+ *		 actually deboosting the owner)
+ * @top_task: the current top waiter
+ *
  * Returns 0 or -EDEADLK.
  */
 static int rt_mutex_adjust_prio_chain(struct task_struct *task,
Signature · 1 line
1.7.9.5
#1 lore raw

[tip:core/locking] rtmutex: Document rt_mutex_adjust_prio_chain()

rtmutex: Document rt_mutex_adjust_prio_chain()
Commit-ID:  0c1061733aa0303e6536c0bc7f86d68f5eb55446
Gitweb:     http://git.kernel.org/tip/0c1061733aa0303e6536c0bc7f86d68f5eb55446
Author:     Juri Lelli <[email protected]>
AuthorDate: Wed, 15 May 2013 11:04:10 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 28 May 2013 09:23:52 +0200

rtmutex: Document rt_mutex_adjust_prio_chain()

Parameters and usage of rt_mutex_adjust_prio_chain() are already documented in Documentation/rt-mutex-design.txt. However, since this function is called from several paths with different semantics (related to the arguments), it is handy to have a quick reference directly in the code.

---
 kernel/rtmutex.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
kernel/rtmutex.c +13 -0
index 1e09308..0dd6aec 100644
@@ -145,6 +145,19 @@ int max_lock_depth = 1024;
 /*
  * Adjust the priority chain. Also used for deadlock detection.
  * Decreases task's usage by one - may thus free the task.
+ *
+ * @task: the task owning the mutex (owner) for which a chain walk is probably
+ *	  needed
+ * @deadlock_detect: do we have to carry out deadlock detection?
+ * @orig_lock: the mutex (can be NULL if we are walking the chain to recheck
+ * 	       things for a task that has just got its priority adjusted, and
+ *	       is waiting on a mutex)
+ * @orig_waiter: rt_mutex_waiter struct for the task that has just donated
+ *		 its priority to the mutex owner (can be NULL in the case
+ *		 depicted above or if the top waiter is gone away and we are
+ *		 actually deboosting the owner)
+ * @top_task: the current top waiter
+ *
  * Returns 0 or -EDEADLK.
  */
 static int rt_mutex_adjust_prio_chain(struct task_struct *task,