diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-09-22 19:28:18 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-09-22 19:28:18 +0000 |
commit | a689a9e9146d06326e1194f1798a5000c749f7cd (patch) | |
tree | 744811d7ec07ee8c995cd5af46916302d7a5a182 /sys/netgraph/ng_base.c | |
parent | 1475e942ed4a544d79230d9b2774b0e79f9189cd (diff) | |
download | FreeBSD-src-a689a9e9146d06326e1194f1798a5000c749f7cd.zip FreeBSD-src-a689a9e9146d06326e1194f1798a5000c749f7cd.tar.gz |
Add ng_rmnode_flags() so the caller can pass NG_QUEUE and have the node
destroyed asynchronously due to locking or other constraints.
Reviewed by: julian
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 4012e35..82caad1 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -1507,7 +1507,7 @@ ng_mkpeer(node_p node, const char *name, const char *name2, char *type) /* Shut this node down as soon as everyone is clear of it */ /* Should add arg "immediately" to jump the queue */ int -ng_rmnode_self(node_p node) +ng_rmnode_flags(node_p node, int flags) { int error; @@ -1517,10 +1517,16 @@ ng_rmnode_self(node_p node) if (node->nd_flags & NGF_CLOSING) return (0); - error = ng_send_fn(node, NULL, &ng_rmnode, NULL, 0); + error = ng_send_fn1(node, NULL, &ng_rmnode, NULL, 0, flags); return (error); } +int +ng_rmnode_self(node_p node) +{ + return (ng_rmnode_flags(node, NG_NOFLAGS)); +} + static void ng_rmhook_part2(node_p node, hook_p hook, void *arg1, int arg2) { |