kgimutexapi

This is an old revision of the document!


Initialize a pre-allocated mutex. The name passed is used for debug etc.

void kgi_mutex_init(

 /* Comment: pointer to the mutex to initialize */
 kgi_mutex_t *mtx,

 /* Comment: name of the mutex */
 const char *name
);

Release a mutex. Memory allocated for the mutex itself is not freed.

void kgi_mutex_done(

 /* Comment: pointer to the mutex to release */
 kgi_mutex_t *mtx
);

Lock the mutex. If the mutex is not free, the thread is blocked.

void kgi_mutex_lock(

 /* Comment: pointer to the mutex to lock */
 kgi_mutex_t *mtx
);

Unlock the mutex previously locked.

void kgi_mutex_unlock(

 /* Comment: pointer to the mutex to unlock */
 kgi_mutex_t *mtx
);
  • kgimutexapi.1107096387.txt.gz
  • Last modified: 2005/01/30 14:46
  • by NicholasSouchu