Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
dec_and_lock.c File Reference
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>

Go to the source code of this file.

Functions

int _atomic_dec_and_lock (atomic_t *atomic, spinlock_t *lock)
 
 EXPORT_SYMBOL (_atomic_dec_and_lock)
 

Function Documentation

int _atomic_dec_and_lock ( atomic_t atomic,
spinlock_t lock 
)

atomic_dec_and_lock - lock on reaching reference count zero : the atomic counter : the spinlock in question

Decrements by 1. If the result is 0, returns true and locks . Returns false for all other cases.

Definition at line 20 of file dec_and_lock.c.

EXPORT_SYMBOL ( _atomic_dec_and_lock  )