20#include "pedigree/kernel/compiler.h"
21#include "pedigree/kernel/processor/types.h"
25#include "pedigree-c-syscall.h"
26#include "pedigreecSyscallNumbers.h"
30EXPORTED_PUBLIC
int pedigree_load_keymap(
char* buf,
size_t sz);
32EXPORTED_PUBLIC
void pedigree_reboot(
void);
34EXPORTED_PUBLIC
void pedigree_haltfs(
void);
36EXPORTED_PUBLIC
int pedigree_get_mount(
char* mount_buf,
char* info_buf,
size_t n);
38EXPORTED_PUBLIC
void* pedigree_sys_request_mem(
size_t len);
40EXPORTED_PUBLIC
void pedigree_input_inhibit_events(
int inhibit);
42EXPORTED_PUBLIC
int pedigree_event_return(
void);
44EXPORTED_PUBLIC
void pedigree_module_load(
char* file);
46EXPORTED_PUBLIC
void pedigree_module_unload(
char* name);
48EXPORTED_PUBLIC
int pedigree_module_is_loaded(
char* name);
50EXPORTED_PUBLIC
int pedigree_module_get_depending(
char* name,
char* buf,
size_t bufsz);
52EXPORTED_PUBLIC
int pedigree_login(uid_t uid);
54int pedigree_load_keymap(
char* buf,
size_t sz) {
55 return syscall2(PEDIGREE_LOAD_KEYMAP, (
long)buf, (
long)sz);
58void pedigree_reboot() {
59 syscall0(PEDIGREE_REBOOT);
62void pedigree_haltfs() {
63 syscall0(PEDIGREE_HALTFS);
66int pedigree_get_mount(
char* mount_buf,
char* info_buf,
size_t n) {
67 return syscall3(PEDIGREE_GET_MOUNT, (
long)mount_buf, (
long)info_buf, n);
70void* pedigree_sys_request_mem(
size_t len) {
71 uintptr_t result = syscall1(PEDIGREE_SYS_REQUEST_MEM, (
long)len);
75void pedigree_input_inhibit_events(
int inhibit) {
76 syscall1(PEDIGREE_INPUT_INHIBIT_EVENTS, inhibit);
79int pedigree_event_return() {
80 return (
int)syscall0(PEDIGREE_EVENT_RETURN);
83void pedigree_module_load(
char* file) {
84 syscall1(PEDIGREE_MODULE_LOAD, (
long)file);
87void pedigree_module_unload(
char* name) {
88 syscall1(PEDIGREE_MODULE_UNLOAD, (
long)name);
91int pedigree_module_is_loaded(
char* name) {
92 return syscall1(PEDIGREE_MODULE_IS_LOADED, (
long)name);
95int pedigree_module_get_depending(
char* name,
char* buf,
size_t bufsz) {
96 return syscall3(PEDIGREE_MODULE_GET_DEPENDING, (
long)name, (
long)buf, bufsz);
100int pedigree_login(uid_t uid) {
101 return (
long)syscall1(PEDIGREE_LOGIN, uid);