corosync 3.1.7
Data Structures | Macros | Enumerations | Functions | Variables
main.c File Reference
#include <config.h>
#include <pthread.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/poll.h>
#include <sys/uio.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <sched.h>
#include <time.h>
#include <semaphore.h>
#include <string.h>
#include <qb/qbdefs.h>
#include <qb/qblog.h>
#include <qb/qbloop.h>
#include <qb/qbutil.h>
#include <qb/qbipcs.h>
#include <corosync/swab.h>
#include <corosync/corotypes.h>
#include <corosync/corodefs.h>
#include <corosync/totem/totempg.h>
#include <corosync/logsys.h>
#include <corosync/icmap.h>
#include "quorum.h"
#include "totemsrp.h"
#include "logconfig.h"
#include "totemconfig.h"
#include "main.h"
#include "sync.h"
#include "timer.h"
#include "util.h"
#include "apidef.h"
#include "service.h"
#include "schedwrk.h"
#include "ipcs_stats.h"
#include "stats.h"
Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  sending_allowed_private_data_struct
 
struct  scheduler_pause_timeout_data
 

Macros

#define IPC_LOGSYS_SIZE   8192*128
 
#define SERVER_BACKLOG   5
 
#define LOCALHOST_IP   inet_addr("127.0.0.1")
 
#define RLIMIT_MEMLOCK   RLIMIT_VMEM
 

Enumerations

enum  move_to_root_cgroup_mode { MOVE_TO_ROOT_CGROUP_MODE_OFF = 0 , MOVE_TO_ROOT_CGROUP_MODE_ON = 1 , MOVE_TO_ROOT_CGROUP_MODE_AUTO = 2 }
 

Functions

 LOGSYS_DECLARE_SYSTEM ("corosync", LOGSYS_MODE_OUTPUT_STDERR|LOGSYS_MODE_OUTPUT_SYSLOG, LOG_DAEMON, LOG_EMERG)
 
 LOGSYS_DECLARE_SUBSYS ("MAIN")
 
qb_loop_t * cs_poll_handle_get (void)
 
int cs_poll_dispatch_add (qb_loop_t *handle, int fd, int events, void *data, int(*dispatch_fn)(int fd, int revents, void *data))
 
int cs_poll_dispatch_delete (qb_loop_t *handle, int fd)
 
void corosync_state_dump (void)
 
const char * corosync_get_config_file (void)
 
void corosync_shutdown_request (void)
 
int main_mcast (const struct iovec *iovec, unsigned int iov_len, unsigned int guarantee)
 
void corosync_recheck_the_q_level (void *data)
 
int corosync_sending_allowed (unsigned int service, unsigned int id, const void *msg, void *sending_allowed_private_data)
 
void corosync_sending_allowed_release (void *sending_allowed_private_data)
 
int message_source_is_local (const mar_message_source_t *source)
 
void message_source_set (mar_message_source_t *source, void *conn)
 
int main (int argc, char **argv, char **envp)
 

Variables

struct sched_param global_sched_param
 

Macro Definition Documentation

◆ IPC_LOGSYS_SIZE

#define IPC_LOGSYS_SIZE   8192*128

Definition at line 133 of file main.c.

◆ LOCALHOST_IP

#define LOCALHOST_IP   inet_addr("127.0.0.1")

Definition at line 284 of file main.c.

◆ RLIMIT_MEMLOCK

#define RLIMIT_MEMLOCK   RLIMIT_VMEM

◆ SERVER_BACKLOG

#define SERVER_BACKLOG   5

Definition at line 148 of file main.c.

Enumeration Type Documentation

◆ move_to_root_cgroup_mode

Enumerator
MOVE_TO_ROOT_CGROUP_MODE_OFF 
MOVE_TO_ROOT_CGROUP_MODE_ON 
MOVE_TO_ROOT_CGROUP_MODE_AUTO 

Definition at line 172 of file main.c.

Function Documentation

◆ corosync_get_config_file()

const char * corosync_get_config_file ( void  )

Definition at line 212 of file main.c.

◆ corosync_recheck_the_q_level()

void corosync_recheck_the_q_level ( void *  data)

Definition at line 723 of file main.c.

References totempg_check_q_level().

◆ corosync_sending_allowed()

int corosync_sending_allowed ( unsigned int  service,
unsigned int  id,
const void *  msg,
void *  sending_allowed_private_data 
)

◆ corosync_sending_allowed_release()

void corosync_sending_allowed_release ( void *  sending_allowed_private_data)

◆ corosync_shutdown_request()

void corosync_shutdown_request ( void  )

Definition at line 258 of file main.c.

References corosync_service_unlink_all().

◆ corosync_state_dump()

void corosync_state_dump ( void  )

◆ cs_poll_dispatch_add()

int cs_poll_dispatch_add ( qb_loop_t *  handle,
int  fd,
int  events,
void *  data,
int(*)(int fd, int revents, void *data)  dispatch_fn 
)

Definition at line 183 of file main.c.

◆ cs_poll_dispatch_delete()

int cs_poll_dispatch_delete ( qb_loop_t *  handle,
int  fd 
)

Definition at line 196 of file main.c.

◆ cs_poll_handle_get()

qb_loop_t * cs_poll_handle_get ( void  )

◆ LOGSYS_DECLARE_SUBSYS()

LOGSYS_DECLARE_SUBSYS ( "MAIN"  )

◆ LOGSYS_DECLARE_SYSTEM()

LOGSYS_DECLARE_SYSTEM ( "corosync"  ,
LOGSYS_MODE_OUTPUT_STDERR LOGSYS_MODE_OUTPUT_SYSLOG,
LOG_DAEMON  ,
LOG_EMERG   
)

◆ main()

int main ( int  argc,
char **  argv,
char **  envp 
)

Definition at line 1284 of file main.c.

◆ main_mcast()

int main_mcast ( const struct iovec *  iovec,
unsigned int  iov_len,
unsigned int  guarantee 
)

◆ message_source_is_local()

int message_source_is_local ( const mar_message_source_t source)

Definition at line 796 of file main.c.

References totempg_my_nodeid_get().

◆ message_source_set()

void message_source_set ( mar_message_source_t source,
void *  conn 
)

Definition at line 807 of file main.c.

References totempg_my_nodeid_get().

Variable Documentation

◆ global_sched_param

struct sched_param global_sched_param

Definition at line 162 of file main.c.