version 1.1, 2012/02/06 23:30:14 |
version 1.1.4.3, 2012/02/24 09:11:49 |
|
|
__KERNEL_RCSID(0, "$NetBSD"); |
__KERNEL_RCSID(0, "$NetBSD"); |
|
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/kernel.h> |
#include <sys/types.h> |
|
|
#include <sys/atomic.h> |
#include <sys/atomic.h> |
#include <sys/kmem.h> |
#include <sys/kmem.h> |
#include <sys/types.h> |
|
|
|
#include "npf_impl.h" |
#include "npf_impl.h" |
|
|
Line 69 npf_rproc_create(prop_dictionary_t rpdic |
|
Line 68 npf_rproc_create(prop_dictionary_t rpdic |
|
npf_rproc_t *rp; |
npf_rproc_t *rp; |
const char *rname; |
const char *rname; |
|
|
rp = kmem_zalloc(sizeof(npf_rproc_t), KM_SLEEP); |
rp = kmem_intr_zalloc(sizeof(npf_rproc_t), KM_SLEEP); |
rp->rp_refcnt = 1; |
rp->rp_refcnt = 1; |
|
|
/* Name and flags. */ |
/* Name and flags. */ |
Line 107 npf_rproc_release(npf_rproc_t *rp) |
|
Line 106 npf_rproc_release(npf_rproc_t *rp) |
|
if (atomic_dec_uint_nv(&rp->rp_refcnt) != 0) { |
if (atomic_dec_uint_nv(&rp->rp_refcnt) != 0) { |
return; |
return; |
} |
} |
kmem_free(rp, sizeof(npf_rproc_t)); |
kmem_intr_free(rp, sizeof(npf_rproc_t)); |
} |
} |
|
|
void |
void |