2023-09-27 15:44:05 +03:00
|
|
|
#ifndef _SYS_BANAN_OS_H
|
|
|
|
#define _SYS_BANAN_OS_H 1
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
2023-09-30 21:20:18 +03:00
|
|
|
#define __need_size_t 1
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2023-09-27 15:44:05 +03:00
|
|
|
#define TTY_CMD_SET 0x01
|
|
|
|
#define TTY_CMD_UNSET 0x02
|
|
|
|
|
|
|
|
#define TTY_FLAG_ENABLE_OUTPUT 1
|
|
|
|
#define TTY_FLAG_ENABLE_INPUT 2
|
|
|
|
|
2023-09-28 12:36:47 +03:00
|
|
|
#define POWEROFF_SHUTDOWN 0
|
|
|
|
#define POWEROFF_REBOOT 1
|
2023-09-28 12:06:17 +03:00
|
|
|
|
2023-09-30 21:20:18 +03:00
|
|
|
struct proc_meminfo_t
|
|
|
|
{
|
|
|
|
size_t page_size;
|
|
|
|
size_t virt_pages;
|
2023-09-30 22:11:45 +03:00
|
|
|
size_t phys_pages;
|
2023-09-30 21:20:18 +03:00
|
|
|
};
|
|
|
|
|
2023-09-27 15:44:05 +03:00
|
|
|
/*
|
|
|
|
fildes: refers to valid tty device
|
|
|
|
command: one of TTY_CMD_* definitions
|
|
|
|
flags: bitwise or of TTY_FLAG_* definitions
|
|
|
|
|
|
|
|
return value: 0 on success, -1 on failure and errno set to the error
|
|
|
|
*/
|
|
|
|
int tty_ctrl(int fildes, int command, int flags);
|
2023-09-28 12:36:47 +03:00
|
|
|
int poweroff(int command);
|
2023-09-27 15:44:05 +03:00
|
|
|
|
|
|
|
__END_DECLS
|
|
|
|
|
|
|
|
#endif
|