Re: spinlock_irq needed
"Salvatore Benedetto" <[email protected]> Tue, 13 Nov 2007 18:21:21 +0000
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On Nov 13, 2007 5:08 PM, Axel Dörfler <[email protected]> wrote: > Hi Salvatore, > > "Salvatore Benedetto" <[email protected]> wrote: > > is it possible to make this public as the comment in the file states? > > > > src/add-ons/kernel/bus_managers/scsi/scsi_lock.h > > > > I'd do it myself if I knew exactly where to put it. :-) > > Perhaps in headers/build/os/drivers/KernelExport.h ? > > It's not a public function, and I don't think it should be - it's just > a convenient functionality. Yes, it's just a convenient functionality, I don't understand why it shouldn't be used? I followed the BeBook at this link http://www.sffjunkie.co.uk/beos/BeBook/DeviceDrivers_Functions.html and I'm using the following code spinlock lock = 0; cpu_status former = disable_interrupts(); acquire_spinlock(&lock); .... release_spinlock(&lock); restore_interrupts(former); but if the code in the scsi_lock was public I would use that as it is easier to use :) > If you're using C++, there is already a private InterruptsSpinLocker > class you can use for that. > Yes I am actually using C++ (ohci driver), I'll have a look at it, thanks. > Bye, > Axel. Salvo -- Salvatore Benedetto (a.k.a. emitrax) Student of Computer and Telecommunications Engineering University of Messina (Italy) www.messinalug.org Please do not send me any word, excel or power point file http://www.gnu.org/philosophy/no-word-attachments.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/