On Tue, 2005-08-23 at 17:58 -0700, john bogus wrote: [...] > and should be replaced by the spinlock interface > > spinlock_t mr_lock = SPIN_LOCK_UNLOCKED; > unsigned long flags; > spin_lock_irqsave(&mr_lock, flags); > /* critical section ... */ > spin_unlock_irqrestore(&mr_lock, flags) > > > but I am working with a few different drivers (some of > which I didn't write). They are using gpio ports on a > embedded arm processor. My critial code would set a > single bit in a port (the other modules use other bits > in the same port) i.e.: > outl(inl(XXXX_PORT) | XXXX_MASK, XXXX_PORT); > > If I use the spinlocks, the spinlock_t mr_lock is not > availble in all the modules.... so do I have a locking ^^^^^^^^ What exactly you mean with this? Do you get compiler errors about unknown variables? > problem? how should I code this ? You probably forget to put an 'extern' declaration in a .h file. Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55 Embedded Linux Development and Services -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/