18 #ifdef POK_NEEDS_MUTEXES
21 #include <core/time.h>
22 #include <core/lockobj.h>
23 #include <core/mutex.h>
24 #include <core/syscall.h>
26 pok_ret_t pok_mutex_trylock (
const pok_mutex_id_t
id,
const uint64_t time)
29 lockattr.operation = LOCKOBJ_OPERATION_LOCK;
33 pok_time_get (&lockattr.time);
34 lockattr.time += time;
37 lockattr.obj_kind = POK_LOCKOBJ_KIND_MUTEX;
38 return (pok_syscall2 (POK_SYSCALL_LOCKOBJ_OPERATION, (uint32_t)
id, (uint32_t)&lockattr));