Date: Fri, 13 Aug 2010 03:13:34 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r211263 - in projects/ofed/head/sys: kern sys Message-ID: <201008130313.o7D3DYTR076840@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Fri Aug 13 03:13:34 2010 New Revision: 211263 URL: http://svn.freebsd.org/changeset/base/211263 Log: - Add a sx_init_flags similar to mtx_init flags as well as SX_SYSINIT_FLAGS Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/kern/kern_sx.c projects/ofed/head/sys/sys/sx.h Modified: projects/ofed/head/sys/kern/kern_sx.c ============================================================================== --- projects/ofed/head/sys/kern/kern_sx.c Fri Aug 13 03:12:42 2010 (r211262) +++ projects/ofed/head/sys/kern/kern_sx.c Fri Aug 13 03:13:34 2010 (r211263) @@ -195,7 +195,7 @@ sx_sysinit(void *arg) { struct sx_args *sargs = arg; - sx_init(sargs->sa_sx, sargs->sa_desc); + sx_init_flags(sargs->sa_sx, sargs->sa_desc, sargs->sa_flags); } void Modified: projects/ofed/head/sys/sys/sx.h ============================================================================== --- projects/ofed/head/sys/sys/sx.h Fri Aug 13 03:12:42 2010 (r211262) +++ projects/ofed/head/sys/sys/sx.h Fri Aug 13 03:13:34 2010 (r211263) @@ -118,18 +118,22 @@ int sx_chain(struct thread *td, struct t struct sx_args { struct sx *sa_sx; const char *sa_desc; + int sa_flags; }; -#define SX_SYSINIT(name, sxa, desc) \ +#define SX_SYSINIT_FLAGS(name, sxa, desc, flags) \ static struct sx_args name##_args = { \ (sxa), \ - (desc) \ + (desc), \ + (flags) \ }; \ SYSINIT(name##_sx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ sx_sysinit, &name##_args); \ SYSUNINIT(name##_sx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ sx_destroy, (sxa)) +#define SX_SYSINIT(name, sxa, desc) SX_SYSINIT_FLAGS(name, sxa, desc, 0) + /* * Full lock operations that are suitable to be inlined in non-debug kernels. * If the lock can't be acquired or released trivially then the work is
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008130313.o7D3DYTR076840>