MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ng_callout

Function ng_callout

freebsd/netgraph/ng_base.c:3785–3809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3783}
3784
3785int
3786ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
3787 ng_item_fn *fn, void * arg1, int arg2)
3788{
3789 item_p item, oitem;
3790
3791 if ((item = ng_alloc_item(NGQF_FN, NG_NOFLAGS)) == NULL)
3792 return (ENOMEM);
3793
3794 item->el_flags |= NGQF_WRITER;
3795 NG_NODE_REF(node); /* and one for the item */
3796 NGI_SET_NODE(item, node);
3797 if (hook) {
3798 NG_HOOK_REF(hook);
3799 NGI_SET_HOOK(item, hook);
3800 }
3801 NGI_FN(item) = fn;
3802 NGI_ARG1(item) = arg1;
3803 NGI_ARG2(item) = arg2;
3804 oitem = c->c_arg;
3805 if (callout_reset(c, ticks, &ng_callout_trampoline, item) == 1 &&
3806 oitem != NULL)
3807 NG_FREE_ITEM(oitem);
3808 return (0);
3809}
3810
3811/* A special modified version of callout_stop() */
3812int

Callers 15

pipe_dequeueFunction · 0.70
pppoe_startFunction · 0.70
ng_pppoe_rcvdataFunction · 0.70
ng_pppoe_rcvdata_etherFunction · 0.70
pppoe_tickerFunction · 0.70
ng_bridge_constructorFunction · 0.70
ng_bridge_timeoutFunction · 0.70
cisco_newhookFunction · 0.70
cisco_keepaliveFunction · 0.70

Calls 1

ng_alloc_itemFunction · 0.70

Tested by

no test coverage detected