mme_shutdown()

Prepare the MME for shut down

Synopsis:

#include <mme/mme.h>

int mme_shutdown ( mme_hdl_t *hdl );

Arguments:

hdl
An MME connection handle.

Library:

mme

Description:

The function mme_shutdown() prepares the MME for shut down and delivers the event MME_EVENT_SHUTDOWN to all control contexts. When you call this function, it stops and disables:

After calling mme_shutdown(), you can:

  1. Call mme_disconnect() to disconnect the client application from the MME.
  2. Shut down the system by, for instance, turning off the power.

Note: The function mme_shutdown() returns immediately and shuts down MME threads in the background. This behavior means that the MME may deliver other events after it has delivered MME_EVENT_SHUTDOWN. When all MME threads have shut down, the MME delivers the event MME_EVENT_SHUTDOWN_COMPLETED.

If you want to shut down the MME without turning off the system, after calling mme_shutdown() your client application needs to kill the MME process.

If your client application calls mme_disconnect() without calling mme_shutdown() first, it will disconnect from the MME control context, but the MME process will continue to run. Your client application will be able to use mme_connect() to make a new connection to the MME.

Events

This function returns the events MME_EVENT_SHUTDOWN and MME_EVENT_SHUTDOWN_COMPLETED.

Blocking and validation

Returns immediately and shuts down threads in background.

Returns:

0
Success.
-1
An error occurred (errno is set).

Examples:

The code snippet below illustrates how to shut down the MME.

mme_hdl_t *hdl = mme_connect("/dev/mme/default", 0);
mme_shutdown(hdl);
mme_disconnect(hdl);

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_connect(), mme_disconnect()