17 #if defined (POK_NEEDS_EVENTS) || defined (POK_NEEDS_BUFFERS) || defined (POK_NEEDS_BLACKBOARDS)
21 #include <core/time.h>
22 #include <core/event.h>
23 #include <core/syscall.h>
24 #include <core/lockobj.h>
26 pok_ret_t pok_event_wait (pok_event_id_t
id,
const uint64_t timeout)
29 lockattr.operation = LOCKOBJ_OPERATION_WAIT;
32 pok_time_gettick (&lockattr.time);
33 lockattr.time += timeout;
35 lockattr.obj_kind = POK_LOCKOBJ_KIND_EVENT;
36 return pok_syscall2 (POK_SYSCALL_LOCKOBJ_OPERATION, (uint32_t)
id, (uint32_t)&lockattr);