44 static void __eventDestroy(
struct object *obj);
45 static void __eventShutdown(
struct object *obj,
UNUSED uint32_t
mode);
46 static int32_t __eventGetStatus(
struct object *obj,
UNUSED uint32_t
mode);
47 static struct linkedList *__eventWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result);
48 static void __eventSignal(
struct object *obj, uint32_t result);
49 static bool __eventAttachObj(
struct object *obj,
struct object *subObj, uint32_t
mode, uint32_t ident);
50 static bool __eventDetachObj(
struct object *obj, uint32_t ident);
66 static void __subEventSignal(
struct object *obj, uint32_t result);
101 __objectInit(&e->
obj, &eventFunctions);
115 static void __eventDestroy(
struct object *
obj)
121 queueWakeup(&e->
waiters,
true, -1);
129 __objectRelease(sub->
wait);
149 static void __eventShutdown(
struct object *obj,
UNUSED uint32_t
mode)
152 queueWakeup(&e->
waiters,
true, -1);
167 static int32_t __eventGetStatus(
struct object *obj,
UNUSED uint32_t
mode)
186 static struct linkedList *__eventWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result)
202 ll_add_after(queue, &sub->
obj.
entry);
220 static void __eventSignal(
struct object *obj, uint32_t result)
240 static bool __eventAttachObj(
struct object *obj,
struct object *subObj, uint32_t
mode, uint32_t ident)
249 __objectInit(&sub->
obj, &subEventFunctions);
253 sub->
wait = __objectAddRef(subObj);
268 static bool __eventDetachObj(
struct object *obj, uint32_t ident)
272 bool success =
false;
281 __objectRelease(sub->
wait);
299 static void __subEventSignal(
struct object *obj, uint32_t result)
struct linkedList subEvents
const struct objectFunctions * functions
void * heapAlloc(uint32_t length)
Allocates a block of kernel memory.
void heapFree(void *addr)
Deallocates a block of kernel memory.
struct linkedList entry_event
struct event * eventCreate(bool wakeupAll)
Creates a new kernel event object.
#define objectContainer(p, type, functions)
struct linkedList waiters
#define LL_FOR_EACH_SAFE(element, next_element, list, type, field)
Allows to iterate a linkedList similar to a for-loop (safe when deleting elements).
#define LL_FOR_EACH(element, list, type, field)
Allows to iterate a linkedList similar to a for-loop.