sched: Report the time of a shutdown

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-03-24 15:05:52 -04:00
parent 4f710b0470
commit 9702d522a4
1 changed files with 2 additions and 1 deletions

View File

@ -247,6 +247,7 @@ sched_clear_shutdown(void)
static void static void
run_shutdown(void) run_shutdown(void)
{ {
uint32_t cur = sched_read_time();
shutdown_status = 2; shutdown_status = 2;
struct callback_handler *p; struct callback_handler *p;
foreachdecl(p, shutdownfuncs) { foreachdecl(p, shutdownfuncs) {
@ -256,7 +257,7 @@ run_shutdown(void)
shutdown_status = 1; shutdown_status = 1;
irq_enable(); irq_enable();
sendf("shutdown static_string_id=%hu", shutdown_reason); sendf("shutdown clock=%u static_string_id=%hu", cur, shutdown_reason);
} }
// Shutdown the machine if not already in the process of shutting down // Shutdown the machine if not already in the process of shutting down