Tor  0.4.7.0-alpha-dev
Macros | Functions | Variables
mainloop_sys.c File Reference

Declare the "mainloop" subsystem. More...

#include "core/or/or.h"
#include "core/mainloop/mainloop_sys.h"
#include "core/mainloop/mainloop.h"
#include "core/mainloop/mainloop_state_st.h"
#include "core/mainloop/netstatus.h"
#include "lib/conf/conftypes.h"
#include "lib/conf/confdecl.h"
#include "lib/subsys/subsys.h"
#include "core/mainloop/mainloop_state.inc"

Go to the source code of this file.

Macros

#define CONF_CONTEXT   TABLE
 
#define MAINLOOP_STATE_MAGIC   0x59455449
 

Functions

static int subsys_mainloop_initialize (void)
 
static void subsys_mainloop_shutdown (void)
 
static int mainloop_set_state (void *arg)
 
static int mainloop_flush_state (void *arg)
 

Variables

static config_format_t mainloop_state_fmt
 
const struct subsys_fns_t sys_mainloop
 

Detailed Description

Declare the "mainloop" subsystem.

Definition in file mainloop_sys.c.

Macro Definition Documentation

◆ CONF_CONTEXT

#define CONF_CONTEXT   TABLE

Declare a list of state variables for mainloop state.

Definition at line 36 of file mainloop_sys.c.

◆ MAINLOOP_STATE_MAGIC

#define MAINLOOP_STATE_MAGIC   0x59455449

Magic number for mainloop state objects

Definition at line 41 of file mainloop_sys.c.

Variable Documentation

◆ mainloop_state_fmt

config_format_t mainloop_state_fmt
static
Initial value:
= {
.size = sizeof(mainloop_state_t),
.magic = { "mainloop_state",
offsetof(mainloop_state_t, magic)
},
.vars = mainloop_state_t_vars,
}
#define MAINLOOP_STATE_MAGIC
Definition: mainloop_sys.c:41

Format object for mainloop state.

Definition at line 46 of file mainloop_sys.c.

◆ sys_mainloop

const struct subsys_fns_t sys_mainloop
Initial value:
= {
.name = "mainloop",
.supported = true,
.level = 5,
.initialize = subsys_mainloop_initialize,
.shutdown = subsys_mainloop_shutdown,
.state_format = &mainloop_state_fmt,
.set_state = mainloop_set_state,
.flush_state = mainloop_flush_state,
}
static config_format_t mainloop_state_fmt
Definition: mainloop_sys.c:46
#define SUBSYS_DECLARE_LOCATION()
Definition: subsys.h:211

Definition at line 69 of file mainloop_sys.c.