| 3731 | } |
| 3732 | |
| 3733 | int |
| 3734 | ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2, |
| 3735 | int flags) |
| 3736 | { |
| 3737 | item_p item; |
| 3738 | |
| 3739 | if ((item = ng_alloc_item(NGQF_FN, flags)) == NULL) { |
| 3740 | return (ENOMEM); |
| 3741 | } |
| 3742 | item->el_flags |= NGQF_WRITER; |
| 3743 | NG_NODE_REF(node); /* and one for the item */ |
| 3744 | NGI_SET_NODE(item, node); |
| 3745 | if (hook) { |
| 3746 | NG_HOOK_REF(hook); |
| 3747 | NGI_SET_HOOK(item, hook); |
| 3748 | } |
| 3749 | NGI_FN(item) = fn; |
| 3750 | NGI_ARG1(item) = arg1; |
| 3751 | NGI_ARG2(item) = arg2; |
| 3752 | return(ng_snd_item(item, flags)); |
| 3753 | } |
| 3754 | |
| 3755 | /* |
| 3756 | * Send ng_item_fn2 function call to the specified node. |
no test coverage detected