search for: shutdown_thread

Displaying 2 results from an estimated 2 matches for "shutdown_thread".

Did you mean: shutdown_pread
2012 Nov 28
4
[minios] Add xenbus shutdown control support
...53:42 2012 +0100 @@ -48,6 +48,10 @@ uint8_t xen_features[XENFEAT_NR_SUBMAPS * 32]; +unsigned int do_shutdown = 0; +unsigned int shutdown_reason; +DECLARE_WAIT_QUEUE_HEAD(shutdown_queue); + void setup_xen_features(void) { xen_feature_info_t fi; @@ -64,6 +68,36 @@ } } +static void shutdown_thread(void *p) +{ + const char *path = "control/shutdown"; + const char *token = path; + xenbus_event_queue events = NULL; + char *shutdown, *err; + xenbus_watch_path_token(XBT_NIL, path, token, &events); + while ((err = xenbus_read(XBT_NIL, path, &shutdown)) != NULL)...
2012 Dec 21
0
mini-os: Notify shutdown through weak function call instead of wake queue
...es(void) { xen_feature_info_t fi; @@ -71,12 +65,19 @@ } #ifdef CONFIG_XENBUS +/* This should be overridden by the application we are linked against. */ +__attribute__((weak)) void app_shutdown(unsigned reason) +{ + printk("Shutdown requested: %d\n", reason); +} + static void shutdown_thread(void *p) { const char *path = "control/shutdown"; const char *token = path; xenbus_event_queue events = NULL; char *shutdown, *err; + unsigned int shutdown_reason; xenbus_watch_path_token(XBT_NIL, path, token, &events); while ((err = xenbus_read(XBT_N...