From 1f2f08084bc8f635c0def905a5cdcf2bdd95cb4b Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sun, 29 Jan 2023 18:31:44 +0800 Subject: [PATCH] xous-api-ticktimer: add calls for freeing objects Add calls to free Mutexes and Condvars. These will go in a destructor, and will remove any trace of these mutexes within the ticktimer server. Signed-off-by: Sean Cross --- api/xous-api-ticktimer/src/api.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/api/xous-api-ticktimer/src/api.rs b/api/xous-api-ticktimer/src/api.rs index 034f30501..4f36d8fe0 100644 --- a/api/xous-api-ticktimer/src/api.rs +++ b/api/xous-api-ticktimer/src/api.rs @@ -50,6 +50,26 @@ pub enum Opcode { /// *arg2*: The number of conditions to notify NotifyCondition = 9, + /// Free a Mutex + /// + /// This call will free a Mutex that was previously Locked or Unlocked. + /// Doing so causes the Mutex to be unlocked. + /// + /// # Arguments + /// + /// *arg1*: The integer that matches the Mutex value + FreeMutex = 10, + + /// Free a Condition + /// + /// This call will free a Condition that was previously waited upon. All + /// pending threads will be forgotten. + /// + /// # Arguments + /// + /// *arg1*: The integer that matches the Condition value + FreeCondition = 11, + /// Invalid call -- an error occurred decoding the opcode InvalidCall = u32::MAX as usize, }