Marc Balmer <mbal...@netbsd.org> wrote: > > There is nothing what prevents from multiple threads calling gpioioctl > > (), which is obviously not MP-safe. As soon as you will start fixing > > this, it will bring you back to the point I have already stated - the > > design needs to be MP-safe in general. > > Well, you need to open it first, before you can to ioctl, and if only > one process can open it, only one process can ioctl it, right?
Wrong. Multiple threads can ioctl and nobody prevents one from having a single process with multiple threads (pthreads, if you like). -- Mindaugas