Esempio n. 1
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Request powerup
 */
void mce_dsme_request_powerup(void)
{
	/* Set up the message */
	DSM_MSGTYPE_POWERUP_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_POWERUP_REQ);

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_POWERUP_REQ");
}
Esempio n. 2
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Send system state inquiry
 */
static void mce_dsme_query_system_state(void)
{
	/* Set up the message */
	DSM_MSGTYPE_STATE_QUERY msg = DSME_MSG_INIT(DSM_MSGTYPE_STATE_QUERY);

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_STATE_QUERY");
}
Esempio n. 3
0
/**
 * Request reboot
 */
void request_reboot(void)
{
	/* Set up the message */
	DSM_MSGTYPE_REBOOT_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_REBOOT_REQ);

	/* Send the message */
	mce_dsme_send(&msg);
	mce_log(LL_DEBUG,
		"DSM_MSGTYPE_REBOOT_REQ sent to DSME");
}
Esempio n. 4
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Register to DSME process watchdog
 */
static void mce_dsme_init_processwd(void)
{
	/* Set up the message */
	DSM_MSGTYPE_PROCESSWD_CREATE msg =
	  DSME_MSG_INIT(DSM_MSGTYPE_PROCESSWD_CREATE);
	msg.pid = getpid();

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_PROCESSWD_CREATE");
}
Esempio n. 5
0
/**
 * Request powerup
 */
void request_powerup(void)
{
	/* Set up the message */
	DSM_MSGTYPE_POWERUP_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_POWERUP_REQ);

	/* Send the message */
	mce_dsme_send(&msg);
	mce_log(LL_DEBUG,
		"DSM_MSGTYPE_POWERUP_REQ sent to DSME");
}
Esempio n. 6
0
/**
 * Send system state inquiry
 */
static void query_system_state(void)
{
	/* Set up the message */
	DSM_MSGTYPE_STATE_QUERY msg = DSME_MSG_INIT(DSM_MSGTYPE_STATE_QUERY);

	/* Send the message */
	mce_dsme_send(&msg);
	mce_log(LL_DEBUG,
		"DSM_MSGTYPE_STATE_QUERY sent to DSME");
}
Esempio n. 7
0
/**
 * Request normal shutdown
 */
void request_normal_shutdown(void)
{
	/* Set up the message */
	DSM_MSGTYPE_SHUTDOWN_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_SHUTDOWN_REQ);

	/* Send the message */
	mce_dsme_send(&msg);
	mce_log(LL_DEBUG,
		"DSM_MSGTYPE_SHUTDOWN_REQ (DSME_NORMAL_SHUTDOWN) "
		"sent to DSME");
}
Esempio n. 8
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Unregister from DSME process watchdog
 */
static void mce_dsme_exit_processwd(void)
{
	mce_log(LL_DEBUG,
		"Disabling DSME process watchdog");

	/* Set up the message */
	DSM_MSGTYPE_PROCESSWD_DELETE msg =
	  DSME_MSG_INIT(DSM_MSGTYPE_PROCESSWD_DELETE);
	msg.pid = getpid();

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_PROCESSWD_DELETE");
}
Esempio n. 9
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Send pong message to the DSME process watchdog
 */
static void mce_dsme_send_pong(void)
{
	/* Set up the message */
	DSM_MSGTYPE_PROCESSWD_PONG msg =
	  DSME_MSG_INIT(DSM_MSGTYPE_PROCESSWD_PONG);
	msg.pid = getpid();

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_PROCESSWD_PONG");

	/* Execute hearbeat actions even if ping-pong ipc failed */
	execute_datapipe(&heartbeat_pipe, GINT_TO_POINTER(0),
			 USE_INDATA, DONT_CACHE_INDATA);
}
Esempio n. 10
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Request normal shutdown
 */
void mce_dsme_request_normal_shutdown(void)
{
	if( datapipe_get_gint(update_mode_pipe) ) {
		mce_log(LL_WARN, "shutdown blocked; os update in progress");
		goto EXIT;
	}

	/* Set up the message */
	DSM_MSGTYPE_SHUTDOWN_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_SHUTDOWN_REQ);

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_SHUTDOWN_REQ(DSME_NORMAL_SHUTDOWN)");
EXIT:
	return;
}
Esempio n. 11
0
File: mce-dsme.c Progetto: g7/mce
/**
 * Request reboot
 */
void mce_dsme_request_reboot(void)
{
	if( datapipe_get_gint(update_mode_pipe) ) {
		mce_log(LL_WARN, "reboot blocked; os update in progress");
		goto EXIT;
	}

	/* Set up the message */
	DSM_MSGTYPE_REBOOT_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_REBOOT_REQ);

	/* Send the message */
	mce_dsme_send(&msg, "DSM_MSGTYPE_REBOOT_REQ");
EXIT:
	return;
}
Esempio n. 12
0
/**
 * Send pong message to the DSME process watchdog
 */
static void dsme_send_pong(void)
{
	/* Set up the message */
	DSM_MSGTYPE_PROCESSWD_PONG msg =
          DSME_MSG_INIT(DSM_MSGTYPE_PROCESSWD_PONG);
	msg.pid = getpid();

	/* Send the message */
	mce_dsme_send(&msg);
	mce_log(LL_DEBUG,
		"DSM_MSGTYPE_PROCESSWD_PONG sent to DSME");

	execute_datapipe(&heartbeat_pipe, GINT_TO_POINTER(0),
			 USE_INDATA, DONT_CACHE_INDATA);
}