Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Spinlock

This is a spinlock implementation. More...

Typedefs

typedef volatile unsigned int MALP_Spinlock
 The type of spinlocks in MALP. More...
 

Functions

int MALP_Spinlock_lock (MALP_Spinlock *atomic)
 Locks the given MALP_Spinlock. More...
 
int MALP_Spinlock_unlock (MALP_Spinlock *atomic)
 Unlocks the given MALP_Spinlock. More...
 
int MALP_Spinlock_trylock (MALP_Spinlock *mutex)
 Tries to lock the given MALP_Spinlock. More...
 

Detailed Description

This is a spinlock implementation.

Typedef Documentation

typedef volatile unsigned int MALP_Spinlock

The type of spinlocks in MALP.

Definition at line 63 of file Spinlock.h.

Function Documentation

int MALP_Spinlock_lock ( MALP_Spinlock atomic)

Locks the given MALP_Spinlock.

Parameters
atomicthe MALP_Spinlock to lock
Returns
0

Definition at line 29 of file Spinlock.c.

Here is the caller graph for this function:

int MALP_Spinlock_trylock ( MALP_Spinlock mutex)

Tries to lock the given MALP_Spinlock.

Parameters
mutexthe MALP_Spinlock to lock
Returns
1 if successfully locked, 0 otherwise (lock already locked)

Definition at line 22 of file Spinlock.c.

Here is the caller graph for this function:

int MALP_Spinlock_unlock ( MALP_Spinlock atomic)

Unlocks the given MALP_Spinlock.

Parameters
atomicthe MALP_Spinlock to unlock
Returns
0

Definition at line 41 of file Spinlock.c.

Here is the caller graph for this function: