31 void (*callback)(
void *);
49 NSLOG(schedule, DEBUG,
"CB at %p already dead.", cb);
63 NSLOG(schedule, DEBUG,
64 "Found match for %p(%p), killing.",
86 .callback_killed =
false,
139 NSLOG(schedule, DEBUG,
140 "Captured a run of %d callbacks to fire.",
int schedule_run(void)
Process events up to current time.
nserror
Enumeration of error codes.
@ NSERROR_NOT_FOUND
Requested item not found.
static GList * pending_callbacks
List of callbacks which have occurred and are pending running.
static GList * queued_callbacks
List of callbacks which are queued to occur in the future.
static GList * this_run
List of callbacks which are about to be run in this schedule_run.
nserror nsgtk_schedule(int t, void(*callback)(void *p), void *cbctx)
static nserror schedule_remove(void(*callback)(void *p), void *cbctx)
remove a matching callback and context tuple from all lists
static void nsgtk_schedule_kill_callback(void *_target, void *_match)
static gboolean nsgtk_schedule_generic_callback(gpointer data)
#define NSLOG(catname, level, logmsg, args...)
Killable callback closure embodiment.
void(* callback)(void *)
The callback function.
void * context
The context for the callback.
bool callback_killed
Whether or not this was killed.