Start the database runtime.
MCO_RET mco_runtime_start(void)
void
This function initializes a semaphore to coordinate access to the database dictionary. It must be called once, and only once, from each process that uses the eXtremeDB runtime, before the database is created with
mco_db_open_dev()ormco_db_load()by the first process and before the database is connected to withmco_db_connect()in subsequent processes. All applications must callmco_runtime_start()to start and then mco_runtime_stop() to shut down the runtime gracefully before the application terminates. (Note that shared memory applications also need to start and stop the runtime.)eXtremeSQL applications can start the runtime implicitly by calling the McoSqlEngine method
open(McoSqlOpenParameters const ¶ms)with theSTART_MCO_RUNTIMEflag set in the McoSqlOpenParameters argumentparams. This flag is set by default. When the McoSqlEngine methodclose()is called the runtime is stopped implicitly.
MCO_S_OK
MCO_E_SHM_ERROR
Application snippet:
int main(int argc, char* argv[])
{
mco_db_h db;
MCO_RET rc;
mco_device_t dev;
mco_db_params_t db_params;
if( (rc = mco_runtime_start()) != MCO_S_OK)
exit(-1);
...
mco_runtime_stop();
}