Skip to content

Commit b5376b2

Browse files
committed
os: Expose power as is_running()
1 parent 1c6f8bb commit b5376b2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

api/kernel/os.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ class OS {
8484
*/
8585
static void halt();
8686

87+
/**
88+
* Returns true when the OS will still be running, and not shutting down.
89+
*/
90+
static bool is_running() {
91+
return power_;
92+
}
93+
8794
/**
8895
* Add handler for standard output.
8996
*/

0 commit comments

Comments
 (0)