GNU libmicrohttpd  0.9.29
mhd_itc.h File Reference

Header for platform-independent inter-thread communication. More...

#include "mhd_itc_types.h"
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for mhd_itc.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_itc_destroy_chk_(itc)
 
#define MHD_ITC_IS_INVALID_(itc)   (! MHD_ITC_IS_VALID_(itc))
 

Detailed Description

Header for platform-independent inter-thread communication.

Author
Karlson2k (Evgeny Grin)
Christian Grothoff

Provides basic abstraction for inter-thread communication. Any functions can be implemented as macro on some platforms unless explicitly marked otherwise. Any function argument can be skipped in macro, so avoid variable modification in function parameters.

Definition in file mhd_itc.h.

Macro Definition Documentation

◆ MHD_itc_destroy_chk_

#define MHD_itc_destroy_chk_ (   itc)
Value:
do { \
if (!MHD_itc_destroy_(itc)) \
MHD_PANIC(_("Failed to destroy ITC.\n")); \
} while(0)
#define _(String)
Definition: mhd_options.h:42

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

Parameters
itcthe itc to destroy

Definition at line 345 of file mhd_itc.h.

Referenced by MHD_start_daemon_va(), and MHD_stop_daemon().

◆ MHD_ITC_IS_INVALID_

#define MHD_ITC_IS_INVALID_ (   itc)    (! MHD_ITC_IS_VALID_(itc))

Check whether ITC has invalid value.

Macro check whether itc value is invalid, macro does not check whether itc was destroyed.

Parameters
itcthe itc to check
Returns
boolean true if itc has invalid value, boolean false otherwise.

Definition at line 359 of file mhd_itc.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 43 of file mhd_itc.h.