6#include <sys/kassert.h>
8#include <sys/spinlock.h>
12#include <sys/ktimer.h>
14#define TIMER_WHEEL_LENGTH 256
64 __sync_fetch_and_add(&evt->
refCount, 1);
71 if (__sync_fetch_and_sub(&evt->
refCount, 1) == 1) {
72 KTimerEvent_Free(evt);
#define DEFINE_SLAB(_type, _pool)
void Slab_Init(Slab *slab, const char *name, uintptr_t objsz, uintptr_t align)
UnixEpoch KTime_GetEpoch()
KTimerEvent * KTimer_Create(uint64_t timeout, KTimerCB cb, void *arg)
void KTimer_Release(KTimerEvent *evt)
void KTimer_Cancel(KTimerEvent *evt)
#define TIMER_WHEEL_LENGTH
void KTimer_Retain(KTimerEvent *evt)
#define LIST_FOREACH_SAFE(var, head, field, tvar)
#define LIST_REMOVE(elm, field)
#define LIST_INSERT_HEAD(head, elm, field)
#define LIST_HEAD(name, type)
void Spinlock_Unlock(Spinlock *lock) __UNLOCK_EX(*lock)
#define SPINLOCK_TYPE_NORMAL
void Spinlock_Lock(Spinlock *lock) __LOCK_EX(*lock)
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)