- From: Frank Mori Hess <fmhess_at_users.sourceforge.net>
- Date: Thu, 17 Feb 2005 18:02:25 -0500
On Wednesday 16 February 2005 09:53 am, Ian Abbott wrote: > Not really a patch.... > > Here's an asm/semaphore.h compatibility header to help build Comedi > drivers for kernel versions prior to 2.2.18. It defines the following > missing macros: > > init_MUTEX(x) > init_MUTEX_LOCKED(x) > DECLARE_MUTEX(name) > DECLARE_MUTEX_LOCKED(name) > > I didn't define sema_init(sem, val) as I the implementation is > arch-dependent. > > The only drivers that use mutexes currently are usbdux and usbduxfast, > and they won't compile for old kernels anyway. Still, there's no reason > why some other drivers couldn't make use of mutexes now! I've committed it, but you should be aware that using mutexes will break your driver for use under RT, since down() can sleep. It doesn't matter for usb drivers though, since I doubt there is any easy way to make them work under RT. -- Frank
Attachments
- application/pgp-signature attachment: stored
Received on 2005-02-17Z23:02:25