Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 313b617 in mainline


Ignore:
Timestamp:
2010-05-26T18:04:55Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
c8e99bb
Parents:
3c664d6
Message:

Remove spinlock_unlocked() and irq_spinlock_unlocked() interfaces because their use in assertions would be a dangerous business.

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/spinlock.h

    r3c664d6 r313b617  
    116116extern void spinlock_unlock_debug(spinlock_t *);
    117117extern bool spinlock_locked(spinlock_t *);
    118 extern bool spinlock_unlocked(spinlock_t *);
    119118
    120119/** Unlock spinlock
     
    288287extern void irq_spinlock_exchange(irq_spinlock_t *, irq_spinlock_t *);
    289288extern bool irq_spinlock_locked(irq_spinlock_t *);
    290 extern bool irq_spinlock_unlocked(irq_spinlock_t *);
    291289
    292290#endif
  • kernel/generic/src/synch/spinlock.c

    r3c664d6 r313b617  
    177177}
    178178
    179 /** Find out whether the spinlock is currently unlocked.
    180  *
    181  * @param lock          Spinlock.
    182  * @return              True if the spinlock is not locked, false otherwise.
    183  */
    184 bool spinlock_unlocked(spinlock_t *lock)
    185 {
    186         return atomic_get(&lock->val) == 0;
    187 }
    188 
    189179#endif
    190180
     
    344334}
    345335
    346 /** Find out whether the IRQ spinlock is currently unlocked.
    347  *
    348  * @param lock          IRQ spinlock.
    349  * @return              True if the IRQ spinlock is not locked, false otherwise.
    350  */
    351 bool irq_spinlock_unlocked(irq_spinlock_t *ilock)
    352 {
    353         return spinlock_unlocked(&ilock->lock);
    354 }
    355 
    356336/** @}
    357337 */
Note: See TracChangeset for help on using the changeset viewer.