看板 FB_smp 關於我們 聯絡資訊
On Tue, 2 Apr 2002, Andrew R. Reiter wrote: :On Mon, 1 Apr 2002, Alfred Perlstein wrote: : ::Your concern is valid, perhaps a macro that automagically makes ::a sysinit to init a mutex? Sort of like the "SYSCALL_MODULE_HELPER" ::stuff, but not as ugly? :: : :How about something along the lines of: Sorry to reply to my own post, but I feel it necesary to mention that I dislike having to pass in sub and order... : :void :mtx_sysinit(void *arg) :{ : struct mtx_init *margs = arg; : : mtx_init(margs->mtx, margs->desc, margs->opts) :} : :#define MTX_SYSINIT(name, desc, lock, opts, sub, order) \ : static struct margs name##_args { \ : lock, \ : desc, \ : opts, \ : }; \ : SYSINIT(name##_sysinit, sub, order, mtx_sysinit, &name##_args) : : :-- :Andrew R. Reiter :arr@watson.org :arr@FreeBSD.org : : -- Andrew R. Reiter arr@watson.org arr@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message