Cleanup headers a bit
This commit is contained in:
@@ -189,7 +189,7 @@ int elf_load(struct process *proc, struct vfs_ioctx *ctx, struct ofile *fd, uint
|
||||
}
|
||||
}
|
||||
|
||||
proc->brk = proc->image_end;
|
||||
proc->brk = (proc->image_end + MM_PAGE_SIZE - 1) & ~MM_PAGE_OFFSET_MASK;
|
||||
|
||||
*entry = ehdr.e_entry;
|
||||
res = 0;
|
||||
|
||||
@@ -4,61 +4,6 @@
|
||||
#include "sys/spin.h"
|
||||
|
||||
struct thread;
|
||||
//struct blkdev;
|
||||
//
|
||||
//struct shm_region {
|
||||
// spin_t lock;
|
||||
//
|
||||
// size_t ref_count;
|
||||
// // List head for tracking ownership of the region
|
||||
// struct list_head owners;
|
||||
// // Link for tracking all the regions in the system
|
||||
// struct list_head link;
|
||||
//
|
||||
// size_t page_count;
|
||||
// uintptr_t phys[0];
|
||||
//};
|
||||
//
|
||||
//// region -> thread ownership link
|
||||
//struct shm_owner_ref {
|
||||
// struct thread *owner;
|
||||
// uintptr_t virt;
|
||||
// struct list_head link;
|
||||
//};
|
||||
//
|
||||
//// thread -> region mapping link
|
||||
//struct shm_region_ref {
|
||||
// enum {
|
||||
// // -> memory pages
|
||||
// SHM_TYPE_PHYS = 0,
|
||||
// // -> block device mapping
|
||||
// SHM_TYPE_BLOCK,
|
||||
// } type;
|
||||
// uintptr_t virt;
|
||||
// struct list_head link;
|
||||
// union {
|
||||
// // Physical mapping
|
||||
// struct shm_region *region;
|
||||
// // Block device mapping
|
||||
// struct {
|
||||
// size_t page_count;
|
||||
// uintptr_t phys_base;
|
||||
// struct blkdev *blk;
|
||||
// } block;
|
||||
// } map;
|
||||
//};
|
||||
//
|
||||
//struct shm_region *shm_region_create(size_t count);
|
||||
//void shm_region_free(struct shm_region *region);
|
||||
//
|
||||
//uintptr_t shm_region_map(struct shm_region *region, struct thread *thr);
|
||||
//void shm_region_release_all(struct thread *thr, int noumap);
|
||||
//struct shm_region_ref *shm_region_find(struct thread *thr, uintptr_t ptr);
|
||||
//
|
||||
//void shm_space_fork(struct thread *dst, struct thread *src);
|
||||
//
|
||||
//void shm_region_describe(struct shm_region *region);
|
||||
//void shm_thread_describe(struct thread *thr);
|
||||
|
||||
void *sys_mmap(void *hint, size_t length, int prot, int flags, int fd, off_t offset);
|
||||
int sys_munmap(void *addr, size_t length);
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
#pragma once
|
||||
#include <sys/types.h>
|
||||
|
||||
//#define SIGHUP 1
|
||||
//#define SIGINT 2
|
||||
//#define SIGQUIT 3
|
||||
//#define SIGTRAP 5
|
||||
//#define SIGABRT 6
|
||||
//#define SIGKILL 9
|
||||
//#define SIGUSR1 10
|
||||
//#define SIGSEGV 11
|
||||
//#define SIGSYS 12
|
||||
//#define SIGPIPE 13
|
||||
//#define SIGALRM 14
|
||||
//#define SIGTERM 15
|
||||
//#define SIGSTOP 19
|
||||
//#define SIGCHLD 17
|
||||
//#define SIGCONT 18
|
||||
//#define SIGTTIN 21
|
||||
//#define SIGTTOU 22
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define SYSCALL_NR_LSEEK 8
|
||||
#define SYSCALL_NR_MMAP 9
|
||||
#define SYSCALL_NR_MUNMAP 11
|
||||
#define SYSCALL_NRX_SBRK 12
|
||||
#define SYSCALL_NR_IOCTL 16
|
||||
#define SYSCALL_NR_ACCESS 21
|
||||
#define SYSCALL_NR_PIPE 22
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#define TCGETS 0x5401
|
||||
#define TCSETS 0x5402
|
||||
#define TIOCGPGRP 0x540F
|
||||
#define TIOCSPGRP 0x5410
|
||||
#define TIOCGWINSZ 0x5413
|
||||
|
||||
|
||||
Reference in New Issue
Block a user