services: ticktimer-server: explicitly specify opcode numbers

These opcode numbers will be baked in at the ABI level for several
libraries such as libstd.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-05-20 12:47:02 +08:00
parent 3b540e4e9a
commit b617ed2f32

View file

@ -1,14 +1,14 @@
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Debug)] #[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Debug)]
pub(crate) enum Opcode { pub(crate) enum Opcode {
/// Get the elapsed time in milliseconds /// Get the elapsed time in milliseconds
ElapsedMs, ElapsedMs = 0,
/// Sleep for the specified numer of milliseconds /// Sleep for the specified numer of milliseconds
SleepMs, SleepMs = 1,
/// Recalculate the sleep time /// Recalculate the sleep time
RecalculateSleep, RecalculateSleep = 2,
/// Suspend/resume callback /// Suspend/resume callback
SuspendResume, SuspendResume = 3,
} }