Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

KMutex.h File Reference

Mutex management. More...

#include "ktypes.h"

Defines

#define KMutex_create()   _KMutex_create (__K_FILE__, __K_LINE__)
 Creates a Mutex.
#define KMutex_destroy(kMutex)   _KMutex_destroy (kMutex, __K_FILE__, __K_LINE__)
 Deletes a mutex.
#define KMutex_lock(kMutex)   _KMutex_lock (kMutex, __K_FILE__, __K_LINE__)
 Locks a mutex. If the mutex already locked, waiting unlock then locks the mutex.
#define KMutex_unlock(kMutex)   _KMutex_unlock (kMutex, __K_FILE__, __K_LINE__)
 Unlocks a mutex.
#define KMutex_timelock(kMutex, ms)   _KMutex_timelock (kMutex, ms, __K_FILE__, __K_LINE__)
 Locks a mutex and waits during a delay. If the mutex already locked, waiting unlock then locks the mutex during the given delay.

Typedefs

typedef _KMutex KMutex
 Mutex.

Functions

KTL_API KMutex_KMutex_create (KString sFile, KInt32 iLine)
 Creates a Mutex.
KTL_API void _KMutex_destroy (KMutex **kMutex, KString file, KInt line)
 Deletes a mutex.
KTL_API KBool _KMutex_lock (KMutex *kMutex, KString file, KInt line)
 Locks a mutex. If the mutex already locked, waiting unlock then locks the mutex.
KTL_API KBool _KMutex_unlock (KMutex *kMutex, KString file, KInt line)
 Unlocks a mutex.
KTL_API KBool _KMutex_timelock (KMutex *kMutex, KUInt32 ms, KString file, KInt line)
 Locks a mutex and waits during a delay. If the mutex already locked, waiting unlock then locks the mutex during the given delay.


Detailed Description

Mutex management.

Version:
KToolLib-1.0
Author:
Fabien Gallot
Date:
05/08/2008
Note:
Copyright © 2008-2010 iKlax Media SAS (www.iklaxmedia.com). All rights reserved.

Define Documentation

 
#define KMutex_create  )     _KMutex_create (__K_FILE__, __K_LINE__)
 

Creates a Mutex.

Returns:
the pointer to the mutex if successful otherwise knull

#define KMutex_destroy kMutex   )     _KMutex_destroy (kMutex, __K_FILE__, __K_LINE__)
 

Deletes a mutex.

Parameters:
kMutex the pointers to the mutex to be deleted

#define KMutex_lock kMutex   )     _KMutex_lock (kMutex, __K_FILE__, __K_LINE__)
 

Locks a mutex. If the mutex already locked, waiting unlock then locks the mutex.

Parameters:
kMutex the pointer to the mutex to be locked
Returns:
ktrue if successful otherwise kfalse

#define KMutex_timelock kMutex,
ms   )     _KMutex_timelock (kMutex, ms, __K_FILE__, __K_LINE__)
 

Locks a mutex and waits during a delay. If the mutex already locked, waiting unlock then locks the mutex during the given delay.

Parameters:
kMutex the pointer to the mutex to be locked
ms the delay in milliseconds to be waited
Returns:
ktrue if successful otherwise kfalse

#define KMutex_unlock kMutex   )     _KMutex_unlock (kMutex, __K_FILE__, __K_LINE__)
 

Unlocks a mutex.

Parameters:
kMutex the pointer to the mutex to be unlocked
Returns:
ktrue if successful otherwise kfalse


Function Documentation

KTL_API KMutex* _KMutex_create KString  sFile,
KInt32  iLine
 

Creates a Mutex.

Parameters:
sFile the file name where this function is called
iLine the line number where this function is called
Returns:
the pointer to the mutex if successful otherwise knull

KTL_API void _KMutex_destroy KMutex **  kMutex,
KString  file,
KInt  line
 

Deletes a mutex.

Parameters:
kMutex the pointers to the mutex to be deleted
file the file name where this function is called
line the line number where this function is called

KTL_API KBool _KMutex_lock KMutex kMutex,
KString  file,
KInt  line
 

Locks a mutex. If the mutex already locked, waiting unlock then locks the mutex.

Parameters:
kMutex the pointer to the mutex to be locked
file the file name where this function is called
line the line number where this function is called
Returns:
ktrue if successful otherwise kfalse

KTL_API KBool _KMutex_timelock KMutex kMutex,
KUInt32  ms,
KString  file,
KInt  line
 

Locks a mutex and waits during a delay. If the mutex already locked, waiting unlock then locks the mutex during the given delay.

Parameters:
kMutex the pointer to the mutex to be locked
ms the delay in milliseconds to be waited
file the file name where this function is called
line the line number where this function is called
Returns:
ktrue if successful otherwise kfalse

KTL_API KBool _KMutex_unlock KMutex kMutex,
KString  file,
KInt  line
 

Unlocks a mutex.

Parameters:
kMutex the pointer to the mutex to be unlocked
file the file name where this function is called
line the line number where this function is called
Returns:
ktrue if successful otherwise kfalse


Generated on Tue Mar 9 10:49:30 2010 for iKlax Tools Library (KToolLib) by doxygen 1.3.8