Changeset 0116f21 in mainline for kernel/generic/include/shutdown.h


Ignore:
Timestamp:
2019-07-18T15:30:31Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
bb580548
Parents:
40043e8
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-07-18 15:26:49)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-07-18 15:30:31)
Message:

Implementing systemcall for shotdown

This commit implements a systemcall for shutdown the system.
It provides the necessary systemcall which creates a new thread
for the kernel task. The thread will then call halt(), reboot()
or cancel the pending shutdown process. The systemcall takes
three parameters: a modus (cancel, halt, reboot), a delay and
a boolean for changing into the kernel console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/shutdown.h

    r40043e8 r0116f21  
    3737
    3838#include <atomic.h>
     39#include <typedefs.h>
     40
     41typedef struct thread thread_t;
    3942
    4043extern atomic_t haltstate;
     44extern thread_t *shutdown_thread;
    4145
    4246extern void halt(void) __attribute__((noreturn));
    4347extern void reboot(void);
    4448extern void arch_reboot(void);
     49extern sys_errno_t sys_shutdown(sysarg_t mode, sysarg_t delay, sysarg_t kconsole);
    4550
    4651#endif
Note: See TracChangeset for help on using the changeset viewer.