Re: spinlock_irq needed
"Salvatore Benedetto" <[email protected]> Wed, 14 Nov 2007 09:52:03 +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, > If you're using C++, there is already a private InterruptsSpinLocker > class you can use for that. > I'm not very good with templates, could you help me understand how it works? I declared a spinlock variable in my class spinlock fSpinLock; then, and the constructor of my class, where I need the spinlock, I added // The controller is now in SUSPEND state, we have 2ms to go OPERATIONAL. // In order to do so we need a spinlock InterruptsSpinLocker spinLocker(fSpinLocker); ... code ... spinLocker.Unlock(); ... other code of my constructor class .. but Stefano told me that it should call the Unlock in the destructor when the object gets out of the scope right ? > Bye, > Axel. Thanks Salvo > > ------------------------------------------------------------------------- > 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/ > _______________________________________________ > Open-beos-kernel-devel mailing list > Open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel > -- 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/