GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
init.c File Reference

initialization routines More...

#include "internal.h"
#include "init.h"

Go to the source code of this file.

Functions

static void mhd_panic_std (void *cls, const char *file, unsigned int line, const char *reason)
 
void MHD_init (void)
 
void MHD_fini (void)
 
void MHD_check_global_init_ (void)
 

Variables

volatile unsigned int global_init_count = 0
 

Detailed Description

initialization routines

Author
Christian Grothoff

Definition in file init.c.

Function Documentation

◆ MHD_check_global_init_()

void MHD_check_global_init_ ( void  )

Check whether global initialisation was performed and call initialiser if necessary.

Definition at line 136 of file init.c.

References global_init_count, MHD_HTTP_OK, MHD_init(), MHD_mutex_lock_chk_, and MHD_mutex_unlock_chk_.

Referenced by MHD_daemon_create().

◆ MHD_fini()

void MHD_fini ( void  )

Global teardown work.

Definition at line 115 of file init.c.

References MHD_HTTP_OK, and MHD_monotonic_sec_counter_finish().

◆ MHD_init()

void MHD_init ( void  )

Globally initialize library.

Initialize do setup work.

Definition at line 86 of file init.c.

References _, MHD_HTTP_OK, MHD_monotonic_sec_counter_init(), MHD_PANIC, mhd_panic, mhd_panic_std(), and NULL.

Referenced by MHD_check_global_init_().

◆ mhd_panic_std()

static void mhd_panic_std ( void cls,
const char file,
unsigned int  line,
const char reason 
)
static

Default implementation of the panic function, prints an error message and aborts.

Parameters
clsunused
filename of the file with the problem
lineline number with the problem
reasonerror message with details

Definition at line 61 of file init.c.

References _, and MHD_HTTP_OK.

Referenced by MHD_init().

Variable Documentation

◆ global_init_count

volatile unsigned int global_init_count = 0

Track global initialisation

Definition at line 33 of file init.c.

Referenced by MHD_check_global_init_().