tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: What's an "MPSAFE" driver need to do?



        Hello.  The way to write a driver to be mpsafe is to use the mutex(9)
calls for locking exclusively.  Then, when you do things like create
threads, setup interupt handlers or start callout timers, you pass an
MPSAFE flags argument to the calls themselves.  I did this for the zaptel
drivers for NetBSD-5 and they work very well in multiprocessor mode.

Hope that helps.
-Brian
On Feb 28, 12:40am, Mouse wrote:
} Subject: What's an "MPSAFE" driver need to do?
} I'm looking at writing driver code for 5.2.  A few manpages (notably
} selinit(9) and other aliases for the same page) speak of "non-MPSAFE
} drivers", but I have been unable to find what a driver has to do in
} order to be MPSAFE - nor for that matter how it is that drivers are or
} aren't marked as MPSAFE, though the latter I may be able to figure out
} (mostly meaning, if I can find and identify the relevant kernel code).
} 
} Did I miss something, or is this just not documented?
} 
} /~\ The ASCII                           Mouse
} \ / Ribbon Campaign
}  X  Against HTML              mouse%rodents-montreal.org@localhost
} / \ Email!         7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
>-- End of excerpt from Mouse




Home | Main Index | Thread Index | Old Index