| 3701 | } |
| 3702 | |
| 3703 | int |
| 3704 | ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2, |
| 3705 | int flags) |
| 3706 | { |
| 3707 | item_p item; |
| 3708 | |
| 3709 | if ((item = ng_alloc_item(NGQF_FN, flags)) == NULL) { |
| 3710 | return (ENOMEM); |
| 3711 | } |
| 3712 | item->el_flags |= NGQF_WRITER; |
| 3713 | NG_NODE_REF(node); /* and one for the item */ |
| 3714 | NGI_SET_NODE(item, node); |
| 3715 | if (hook) { |
| 3716 | NG_HOOK_REF(hook); |
| 3717 | NGI_SET_HOOK(item, hook); |
| 3718 | } |
| 3719 | NGI_FN(item) = fn; |
| 3720 | NGI_ARG1(item) = arg1; |
| 3721 | NGI_ARG2(item) = arg2; |
| 3722 | return(ng_snd_item(item, flags)); |
| 3723 | } |
| 3724 | |
| 3725 | /* |
| 3726 | * Send ng_item_fn2 function call to the specified node. |
no test coverage detected