diff options
Diffstat (limited to 'zephyr/shim/src/util.c')
-rw-r--r-- | zephyr/shim/src/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zephyr/shim/src/util.c b/zephyr/shim/src/util.c index 38a254bf47..ca45025cd7 100644 --- a/zephyr/shim/src/util.c +++ b/zephyr/shim/src/util.c @@ -234,6 +234,14 @@ enum cond_internal_bits { COND_FALL_MASK = BIT(2), /* set if 1->0 */ }; +void cond_init(cond_t *c, int val) +{ + if (val) + *c = COND_CURR_MASK; + else + *c = 0; +} + void cond_set(cond_t *c, int val) { if (val && cond_is(c, 0)) |