tasklet_t * tasklet_arm_alloc(tsk_callback_t *callback, void *opaque) { tasklet_t *tsk = calloc(1, sizeof(*tsk)); if (tsk) { tsk->tsk_allocated = 1; tasklet_arm(tsk, callback, opaque); } return tsk; }
tasklet_t * tasklet_arm_alloc(tsk_callback_t *callback, void *opaque) { tasklet_t *tsk = calloc(1, sizeof(*tsk)); if (tsk) { memoryinfo_alloc(&tasklet_memoryinfo, sizeof(*tsk)); tsk->tsk_free = free; tasklet_arm(tsk, callback, opaque); } return tsk; }