CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2015/09/11 13:13:22
Modified files: sys/kern : kern_synch.c share/man/man9 : Makefile Added files: sys/sys : refcnt.h share/man/man9 : refcnt_init.9 Log message: introduce a wrapper around reference counts called refcnt. its basically atomic inc/dec, but it includes magical sleep code in refcnt_finalise that is better written once than many times. refcnt_finalise sleeps until all references are released and does so with sleep_setup and sleep_finalize, which is fairly subtle. putting this in now so i we can get on with work in the stack, a proper discussion about visibility and how available intrinsics should be in the kernel can happen after next week. with help from guenther@ ok guenther@ deraadt@ mpi@