- From: Bernd Porr <BerndPorr_at_f2s.com>
- Date: Sat, 19 Mar 2005 19:51:39 +0000
That's right. For me it was more important to get it working under
multi-threaded kernels. However, is there a better way to do it?
/Bernd
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
Room 519, Rankine Building, Oakfield Avenue,
Glasgow, G12 8LT
Frank Mori Hess wrote:
> 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.
>
Received on 2005-03-19Z19:51:39