GNU libmicrohttpd  0.9.72
mhd_locks.h File Reference
#include "mhd_options.h"
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for mhd_locks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MHD_PANIC(msg)
 
#define MHD_mutex_destroy_chk_(pmutex)
 
#define MHD_mutex_lock_chk_(pmutex)
 
#define MHD_mutex_unlock_chk_(pmutex)
 

Macro Definition Documentation

◆ MHD_mutex_destroy_chk_

#define MHD_mutex_destroy_chk_ (   pmutex)
Value:
do { \
if (! MHD_mutex_destroy_ (pmutex)) \
MHD_PANIC (_ ("Failed to destroy mutex.\n")); \
} while (0)
#define _(String)
Definition: mhd_options.h:42
#define MHD_mutex_destroy_(ignore)
Definition: mhd_locks.h:190

Destroy previously initialised mutex and abort execution if error is detected.

Parameters
pmutexpointer to mutex

Definition at line 121 of file mhd_locks.h.

◆ MHD_mutex_lock_chk_

#define MHD_mutex_lock_chk_ (   pmutex)
Value:
do { \
if (! MHD_mutex_lock_ (pmutex)) \
MHD_PANIC (_ ("Failed to lock mutex.\n")); \
} while (0)
#define MHD_mutex_lock_(ignore)
Definition: mhd_locks.h:192

Acquire lock on previously initialised mutex. If mutex was already locked by other thread, function blocks until mutex becomes available. If error is detected, execution will be aborted.

Parameters
pmutexpointer to mutex

Definition at line 154 of file mhd_locks.h.

◆ MHD_mutex_unlock_chk_

#define MHD_mutex_unlock_chk_ (   pmutex)
Value:
do { \
if (! MHD_mutex_unlock_ (pmutex)) \
MHD_PANIC (_ ("Failed to unlock mutex.\n")); \
} while (0)
#define MHD_mutex_unlock_(ignore)
Definition: mhd_locks.h:194

Unlock previously initialised and locked mutex. If error is detected, execution will be aborted.

Parameters
pmutexpointer to mutex

Definition at line 180 of file mhd_locks.h.

◆ MHD_PANIC

#define MHD_PANIC (   msg)
Value:
do { fprintf (stderr, \
"Abnormal termination at %d line in file %s: %s\n", \
(int) __LINE__, __FILE__, msg); abort (); \
} while (0)

Definition at line 61 of file mhd_locks.h.