# mco_cluster_barrier

This function is called to synchronize cluster nodes.

### For an overview see page Cluster Applications in C

### Prototype

        MCO_RET	mco_cluster_barrier(	/*IN*/ mco_db_h db )

### Arguments

db | Connection to the database

### Description

This function blocks the caller until all cluster members have called it; the call returns at any node only after all nodes have entered the call. `mco_cluster_barrier()` can be called by only one thread on each node at a time.

### Return Codes

MCO_S_OK | The cluster was stopped successfully
MCO_E_CLUSTER_NOT_INITIALIZED | The database was not created by mco_cluster_db_open(). Note: it may have been created by `mco_db_open_dev()` by mistake
MCO_E_CLUSTER_BUSY | A thread has attempted to call the function at a time when another thread has already called it

### Files

Header file:
mcocluster.h
Source file:
mcocluster.c
Library:
libmcocluster.a