Update userspace

This commit is contained in:
Alex
2023-06-10 13:10:56 +03:00
parent ed5faa7b55
commit 22e75b9540
63 changed files with 2362 additions and 2151 deletions

View File

@@ -3,49 +3,6 @@
#include <stddef.h>
enum KCtl
{
KCTL_NULL,
KCTL_GET_PID,
KCTL_GET_TID,
KCTL_GET_UID,
KCTL_GET_GID,
/**
* @brief Get the page size
*/
KCTL_GET_PAGE_SIZE,
/**
* @brief Check whether the current thread is critical
*/
KCTL_IS_CRITICAL,
/**
* @brief Register an ELF library
* @fn int RegisterELFLib(char *Identifier, char *Path)
*/
KCTL_REGISTER_ELF_LIB,
/**
* @brief Get an ELF library
* @fn uintptr_t GetELFLib(char *Identifier);
*/
KCTL_GET_ELF_LIB_FILE,
/**
* @brief Get an ELF library
* @fn uintptr_t GetELFLib(char *Identifier);
*/
KCTL_GET_ELF_LIB_MEMORY_IMAGE,
KCTL_GET_FRAMEBUFFER_BUFFER,
KCTL_GET_FRAMEBUFFER_WIDTH,
KCTL_GET_FRAMEBUFFER_HEIGHT,
KCTL_GET_FRAMEBUFFER_SIZE,
};
long DoCtl(uint64_t Command, uint64_t Arg1, uint64_t Arg2, uint64_t Arg3, uint64_t Arg4);
uintptr_t KrnlRequestPages(size_t Count);

View File

@@ -5,21 +5,21 @@
typedef struct
{
void *KernelPrivate;
void *KernelPrivate;
} File;
enum FileFlags
{
FILE_READ = 1,
FILE_WRITE = 2,
FILE_APPEND = 4,
FILE_CREATE = 8,
FILE_TRUNCATE = 16,
FILE_EXCLUSIVE = 32,
FILE_DIRECTORY = 64,
FILE_SYMLINK = 128,
FILE_NONBLOCK = 256,
FILE_CLOEXEC = 512,
FILE_READ = 1,
FILE_WRITE = 2,
FILE_APPEND = 4,
FILE_CREATE = 8,
FILE_TRUNCATE = 16,
FILE_EXCLUSIVE = 32,
FILE_DIRECTORY = 64,
FILE_SYMLINK = 128,
FILE_NONBLOCK = 256,
FILE_CLOEXEC = 512,
};
File *FileOpen(const char *Path, uint64_t Flags);