On Sun, Jun 22, 2014 at 7:14 AM, Matt Thomas <[email protected]> wrote: > > On Jun 21, 2014, at 5:56 AM, Ryota Ozaki <[email protected]> wrote: > >> On Sat, Jun 21, 2014 at 10:00 AM, Matt Thomas <[email protected]> wrote: >>> >>> >>> On Jun 20, 2014, at 5:57 AM, Ryota Ozaki <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I've prepared a trial patch of MPSAFE networking. >>>> >>>> http://www.netbsd.org/~ozaki-r/mpsafe-wm.diff >>>> >>> >>> The kmutex_t in ifqueue, etc. should be pointers and not in the structure >>> themselves. >>> That can simply the macros to test for a NULL pointer for the locks in the >>> non-WM case. >>> >>> Consider using mutex_obj_alloc to get mutexes instead of the embedding them >>> in the >>> structures. >> >> Well...do you mean that the macros should be like these? >> >> #define WM_LOCK(_sc) if ((_sc)->sc_txrx_lock) >> mutex_enter((_sc)->sc_txrx_lock) >> #define WM_UNLOCK(_sc) if ((_sc)->sc_txrx_lock) >> mutex_exit((_sc)->sc_txrx_lock) > > I more thinking of the ifq macros. >
I see. So I updated the patch: http://www.netbsd.org/~ozaki-r/mpsafe-wm.diff Regards, ozaki-r
