sync.c File Reference
`#include <config.h>`
`#include <sys/types.h>`
`#include <sys/socket.h>`
`#include <sys/un.h>`
`#include <sys/ioctl.h>`
`#include <netinet/in.h>`
`#include <sys/uio.h>`
`#include <unistd.h>`
`#include <fcntl.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <errno.h>`
`#include <time.h>`
`#include <arpa/inet.h>`
`#include <corosync/corotypes.h>`
`#include <corosync/swab.h>`
`#include <corosync/totem/totempg.h>`
`#include <corosync/totem/totem.h>`
`#include <corosync/logsys.h>`
`#include <qb/qbipc_common.h>`
`#include "schedwrk.h"`
`#include "quorum.h"`
`#include "sync.h"`
`#include "main.h"`
Include dependency graph for sync.c:

Go to the source code of this file.

## Data Structures

struct | service_entry
struct | processor_entry
struct | req_exec_service_build_message
struct | req_exec_barrier_message

## Macros

#define | MESSAGE_REQ_SYNC_BARRIER 0
#define | MESSAGE_REQ_SYNC_SERVICE_BUILD 1

## Enumerations

enum | sync_process_state { PROCESS , ACTIVATE }
enum | sync_state { SYNC_SERVICELIST_BUILD , SYNC_PROCESS , SYNC_BARRIER }

## Functions

| LOGSYS_DECLARE_SUBSYS ("SYNC")
int | sync_init (int(*sync_callbacks_retrieve)(int service_id, struct sync_callbacks *callbacks), void(*synchronization_completed)(void))
void | sync_start (const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
void | sync_save_transitional (const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
void | sync_abort (void)

## Variables

int(* | my_sync_callbacks_retrieve )(int service_id, struct sync_callbacks *callbacks)

## Macro Definition Documentation

## MESSAGE_REQ_SYNC_BARRIER

#define MESSAGE_REQ_SYNC_BARRIER 0

Definition at line 63 of file sync.c.

## MESSAGE_REQ_SYNC_SERVICE_BUILD

#define MESSAGE_REQ_SYNC_SERVICE_BUILD 1

Definition at line 64 of file sync.c.

## Enumeration Type Documentation

## sync_process_state

enum sync_process_state

Enumerator
PROCESS |
ACTIVATE |

Definition at line 66 of file sync.c.

## sync_state

enum sync_state

Enumerator
SYNC_SERVICELIST_BUILD |
SYNC_PROCESS |
SYNC_BARRIER |

Definition at line 71 of file sync.c.

## Function Documentation

## LOGSYS_DECLARE_SUBSYS()

LOGSYS_DECLARE_SUBSYS | ( | "SYNC" |  | ) |

## sync_abort()

void sync_abort | ( | void |  | ) |

Definition at line 535 of file sync.c.

References ENTER, my_sync_callbacks_retrieve, nodeid, schedwrk_destroy(), service_entry::sync_abort, and SYNC_PROCESS.

## sync_init()

int sync_init | ( | int(*)(int service_id, struct sync_callbacks *callbacks) | sync_callbacks_retrieve,
|  | void(*)(void) | synchronization_completed
| ) |  |

Definition at line 158 of file sync.c.

References log_printf, LOGSYS_LEVEL_ERROR, my_sync_callbacks_retrieve, nodeid, totempg_groups_initialize(), and totempg_groups_join().

## sync_save_transitional()

void sync_save_transitional | ( | const unsigned int * | member_list,
|  | size_t | member_list_entries,
|  | const struct memb_ring_id * | ring_id
| ) |  |

Definition at line 524 of file sync.c.

References ENTER, and nodeid.

## sync_start()

void sync_start | ( | const unsigned int * | member_list,
|  | size_t | member_list_entries,
|  | const struct memb_ring_id * | ring_id
| ) |  |

Definition at line 512 of file sync.c.

References ENTER, nodeid, and ring_id.

## Variable Documentation

## my_sync_callbacks_retrieve

int(* my_sync_callbacks_retrieve) (int service_id, struct sync_callbacks *callbacks) | ( | int | service_id,
|  | struct sync_callbacks * | callbacks
| ) |  |

Definition at line 154 of file sync.c.

Referenced by sync_abort(), and sync_init().