diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-09-11 20:21:02 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-09-11 20:21:02 +0000 |
commit | 1e10d6c161a9b46132fe96c7ec70b18bf6906417 (patch) | |
tree | 0d12b0e4e9e8e0e8c670a0d9d50256766db7c570 /sys/kern/kern_srp.c | |
parent | 89f477ccdc892784f712480de2d33171c44772d1 (diff) |
unbreak build on UP kernels.
found by deraadt@
Diffstat (limited to 'sys/kern/kern_srp.c')
-rw-r--r-- | sys/kern/kern_srp.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/sys/kern/kern_srp.c b/sys/kern/kern_srp.c index 873c1ee2272..d1ad6122481 100644 --- a/sys/kern/kern_srp.c +++ b/sys/kern/kern_srp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_srp.c,v 1.5 2015/09/11 19:22:37 dlg Exp $ */ +/* $OpenBSD: kern_srp.c,v 1.6 2015/09/11 20:21:01 dlg Exp $ */ /* * Copyright (c) 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -72,6 +72,12 @@ srp_get_locked(struct srp *srp) return (srp->ref); } +void +srp_finalize(struct srp_gc *srp_gc) +{ + refcnt_finalize(&srp_gc->srp_gc_refcnt, "srpfini"); +} + #ifdef MULTIPROCESSOR #include <machine/cpu.h> #include <sys/pool.h> @@ -178,12 +184,6 @@ srp_update(struct srp_gc *srp_gc, struct srp *srp, void *v) srp_v_gc_start(srp_gc, srp, v); } -void -srp_finalize(struct srp_gc *srp_gc) -{ - refcnt_finalize(&srp_gc->srp_gc_refcnt, "srpfini"); -} - static inline void * srp_v(struct srp_hazard *hzrd, struct srp *srp) { @@ -268,18 +268,10 @@ srp_startup(void) } void -srp_finalize(struct srp_gc *srp_gc) -{ - KASSERT(srp_gc->srp_gc_refcount == 1); - - srp_gc->srp_gc_refcount--; -} - -void srp_v_gc_start(struct srp_gc *srp_gc, struct srp *srp, void *v) { (*srp_gc->srp_gc_dtor)(srp_gc->srp_gc_cookie, v); - srp_gc->srp_gc_refcount--; + refcnt_rele_wake(&srp_gc->srp_gc_refcnt); } #endif /* MULTIPROCESSOR */ |