2023-09-27 15:44:05 +03:00
|
|
|
#include <sys/banan-os.h>
|
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
int tty_ctrl(int fildes, int command, int flags)
|
|
|
|
{
|
|
|
|
return syscall(SYS_TTY_CTRL, fildes, command, flags);
|
|
|
|
}
|
2023-09-28 12:36:47 +03:00
|
|
|
|
|
|
|
int poweroff(int command)
|
|
|
|
{
|
|
|
|
return syscall(SYS_POWEROFF, command);
|
|
|
|
}
|
2024-01-10 14:46:29 +02:00
|
|
|
|
|
|
|
int load_keymap(const char* path)
|
|
|
|
{
|
|
|
|
return syscall(SYS_LOAD_KEYMAP, path);
|
|
|
|
}
|
2024-05-29 15:58:46 +03:00
|
|
|
|
|
|
|
long smo_create(size_t size, int prot)
|
|
|
|
{
|
|
|
|
return syscall(SYS_SMO_CREATE, size, prot);
|
|
|
|
}
|
|
|
|
|
|
|
|
void* smo_map(long key)
|
|
|
|
{
|
|
|
|
long ret = syscall(SYS_SMO_MAP, key);
|
|
|
|
if (ret < 0)
|
|
|
|
return nullptr;
|
|
|
|
return reinterpret_cast<void*>(ret);
|
|
|
|
}
|