Remove function declarations from user headers

This commit is contained in:
Mark 2020-07-13 21:14:33 +03:00
parent e466db979a
commit 1c2214d912
9 changed files with 5 additions and 23 deletions

3
include/sys/reboot.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
void system_power_cmd(unsigned int cmd);

View File

@ -1,5 +0,0 @@
#pragma once
#if !defined(__KERNEL__)
int ioctl(int fd, unsigned int cmd, void *arg);
#endif

View File

@ -2,8 +2,3 @@
#define NETCTL_SET_INADDR 0x0001
#define NETCTL_GET_INADDR 0x0002
#if !defined(__KERNEL__)
#include <stdint.h>
int netctl(const char *iface, uint32_t cmd, void *arg);
#endif

View File

@ -7,9 +7,3 @@
#define YGG_REBOOT_MAGIC1 0xD1ED1ED1
#define YGG_REBOOT_MAGIC2 0x818471ED
#if defined(__KERNEL__)
// TODO: move to kernel-only header
void system_power_cmd(unsigned int cmd);
#else
int reboot(int magic1, int magic2, unsigned int cmd, void *arg);
#endif

View File

@ -66,5 +66,3 @@ struct user_stack {
#if !defined(__KERNEL__)
typedef struct user_stack stack_t;
#endif
int kill(int pid, int signum);

View File

@ -18,6 +18,7 @@ struct timespec {
typedef uint64_t time_t;
// TODO: move to kernel header
#if defined(__KERNEL__)
struct tm;

View File

@ -8,7 +8,3 @@ struct utsname {
char machine[16];
char domainname[64];
};
#if !defined(__KERNEL__)
int uname(struct utsname *buf);
#endif

View File

@ -9,7 +9,6 @@ KERNEL_HEADERS="include/user/fcntl.h \
include/user/errno.h \
include/user/time.h \
include/user/dirent.h \
include/user/ioctl.h \
include/user/stat.h \
include/user/statvfs.h \
include/user/mount.h \

View File

@ -6,6 +6,7 @@
#include "arch/amd64/cpu.h"
#include "user/signum.h"
#include "user/reboot.h"
#include "sys/reboot.h"
#include "sys/assert.h"
#include "sys/thread.h"
#include "sys/sched.h"