summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/futexmgr.H
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2012-01-12 10:32:19 -0600
committerDouglas R. Gilbert <dgilbert@us.ibm.com>2012-01-25 10:54:55 -0600
commitc4f6f3ee887c0fa89c4ed5c311410363f6d61cb4 (patch)
treee309f1aaef54ba14d38bd7d09c63e456edd7a612 /src/include/kernel/futexmgr.H
parentcad6f41c5ceb5affe968a32618e4cf5d53cb7554 (diff)
downloadtalos-hostboot-c4f6f3ee887c0fa89c4ed5c311410363f6d61cb4.tar.gz
talos-hostboot-c4f6f3ee887c0fa89c4ed5c311410363f6d61cb4.zip
Conditional Variable support
Change-Id: Ib715b3a4e775ef183244e8769c6560a85ac19104 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/612 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel/futexmgr.H')
-rw-r--r--src/include/kernel/futexmgr.H34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/include/kernel/futexmgr.H b/src/include/kernel/futexmgr.H
index 75fc31b08..aeba05291 100644
--- a/src/include/kernel/futexmgr.H
+++ b/src/include/kernel/futexmgr.H
@@ -53,12 +53,18 @@ class FutexManager
static uint64_t wait(task_t * i_task, uint64_t * i_addr, uint64_t i_val);
/**
- * Wakeup threads
- * @param[in] i_addr pointer to a futex
- * @param[in] i_count The max number of threads to wake
- * @returns The number of threads awoken
+ * Wakeup and optionally move waiting processes.
+ * @param[in] i_futex1 pointer to a futex
+ * @param[in] i_count1 The max number of tasks to wake
+ * @param[in] i_futex2 pointer to a futex, (default NULL) Optional
+ * futex to move i_count_2 unwoken tasks to.
+ * @param[in] i_count2 The max number of theads to move from futex1 to
+ * futex2. (default 0)
+ *
+ * @returns The number of tasks awoken
*/
- static uint64_t wake(uint64_t * i_addr, uint64_t i_count);
+ static uint64_t wake(uint64_t * i_futex1, uint64_t i_count1,
+ uint64_t * i_futex2 = NULL, uint64_t i_count2 = 0);
protected:
@@ -74,22 +80,12 @@ class FutexManager
private: // functions
- /**
- * Put the current processes on a wait queue
- * @param[in] i_task pointer to the current task structure
- * @param[in] i_addr Futex address
- * @param[in] i_val Value that *i_addr should contain
- * @returns [0 | error code] if *i_addr != i_val returns EWOULDBLOCK
- */
+ /** see wait(...) */
uint64_t _wait(task_t * i_task, uint64_t * i_addr, uint64_t i_val);
- /**
- * Wakeup threads
- * @param[in] i_addr pointer to a futex
- * @param[in] i_count The max number of threads to wake
- * @returns The number of threads awoken
- */
- uint64_t _wake(uint64_t * i_addr, uint64_t i_count);
+ /** see wake(...) */
+ uint64_t _wake(uint64_t * i_futex1, uint64_t i_count1,
+ uint64_t * i_futex2, uint64_t i_count2);
private: // data
OpenPOWER on IntegriCloud