git: netgraph7: Factor out and inline item reference counting code.

Nuno Antunes nant at crater.dragonflybsd.org
Tue Jul 15 23:02:24 PDT 2014


commit cfb360d8bbe9d8e418568a700ec597308a585f0b
Author: Nuno Antunes <nuno.antunes at gmail.com>
Date:   Tue Jul 15 03:16:18 2014 +0100

    netgraph7: Factor out and inline item reference counting code.
    
    * Netgraph7 assumes that nodes synchronously consume the items passed to them,
      i.e. either 1) immediatly drop the item or 2) immediatly pass the item to the
      next node.
    
      The previous assumption is not true for nodes that have their own internal
      item queues and defer the processing of the item.  Such nodes can use these
      routines to prevent the items from being freed too early.
    
    * Move the apply callback check into the item reference release code.

Summary of changes:
 sys/netgraph7/netgraph.h         |  2 +-
 sys/netgraph7/netgraph/ng_base.c | 24 ++++--------------------
 sys/netgraph7/netgraph2.h        | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cfb360d8bbe9d8e418568a700ec597308a585f0b


-- 
DragonFly BSD source repository



More information about the Commits mailing list