From 319e0e0641b03f5c4b019a8080b3147cf8cf6a26 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 26 Mar 2022 02:35:38 +0800 Subject: [PATCH] add a comment about not modifying ticktimer APIs due to libstd dependency --- services/ticktimer-server/src/api.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/services/ticktimer-server/src/api.rs b/services/ticktimer-server/src/api.rs index c120f2b3c..bb6a22056 100644 --- a/services/ticktimer-server/src/api.rs +++ b/services/ticktimer-server/src/api.rs @@ -1,3 +1,4 @@ +/// Do not modify the discriminants in this structure. They are used in `libstd` directly. #[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Debug)] pub(crate) enum Opcode { /// Get the elapsed time in milliseconds @@ -19,31 +20,31 @@ pub(crate) enum Opcode { GetVersion = 5, /// Lock the given Mutex, blocking if it is already locked. - /// + /// /// # Arguments - /// + /// /// *arg1*: An integer of some sort, such as the address of the Mutex LockMutex = 6, /// Unlock the given Mutex - /// + /// /// # Arguments - /// + /// /// *arg1*: An integer of some sort, such as the address of the Mutex UnlockMutex = 7, /// Wait for a given condition to be signalled - /// + /// /// # Arguments - /// + /// /// *arg1*: An integer of some sort, such as the address of the Condvar /// *arg2*: The number of milliseconds to wait, or 0 to wait forever WaitForCondition = 8, /// Notify a condition - /// + /// /// # Arguments - /// + /// /// *arg1*: An integer of some sort, such as the address of the Condvar /// *arg2*: The number of conditions to notify NotifyCondition = 9,