50#define AURORA_SYSCALL_MAGIC 0x15062023
106extern int ProcessLoadExec(
int proc_id,
char* filename,
int argc,
char** argv);
168extern int OpenFile(
char* filename,
int mode);
176extern size_t ReadFile(
int fd,
void* buffer,
size_t length);
184extern size_t WriteFile(
int fd,
void* buffer,
size_t length);
218extern int FileStat(
int fd,
void* buf);
272extern int OpenDir(
char* filename);
279extern int ReadDir(
int dirfd,
void* dirent);
338extern int NetListen(
int sockfd,
int backlog);
void(* AuSigHandler)(int signum)
Definition signal.h:75
size_t socklen_t
Definition socket.h:60
void(* AuSignalHandler)(int signum)
Definition signal.h:65
int threadID
Definition main.cpp:58
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
void(* entry)(void *)
Definition process.h:98
int StartTimer(int threadID)
StartTimer – starts the timer.
Definition timerserv.cpp:52
void SignalReturn(int num)
SignalReturn – returns from a signal handler.
Definition thrserv.cpp:205
int CreateProcess(int parent_id, char *name)
CreateProcess – creates a new process slot.
Definition thrserv.cpp:116
int SetITimer(int which, const itimerval_t *new_value, itimerval_t *old_value)
Definition thrserv.c:380
int FileStat(int fd, void *buf)
FileStat – writes information related to file.
Definition fileserv.cpp:401
int GetITimer(int which, const itimerval_t *curr_value)
Definition thrserv.c:391
int CreateTimer(int threadID, int maxTickLimit, uint8_t updatemode)
CreateTimer – create timer service.
Definition timerserv.cpp:43
int ProcessGetFileDesc(const char *filename)
ProcessGetFileDesc – Searches all process file descriptor entries for specific filename fd.
Definition fileserv.cpp:506
int NetConnect(int sockfd, sockaddr *addr, socklen_t addrlen)
Definition netserv.cpp:81
int ProcessSleep(uint64_t ms)
ProcessSleep – put the current thread to sleep and process to busy wait state.
Definition thrserv.cpp:188
int ProcessHeapUnmap(void *ptr, size_t sz)
ProcessHeapUnmap – unmaps previosly allocated heap memory.
Definition mmserv.cpp:150
int Alarm(uint64_t seconds)
Alarm – schedules a timer for next one-shot.
Definition thrserv.c:373
int CreateSharedMem(uint16_t key, size_t sz, uint8_t flags)
CreateSharedMem – create a shared memory chunk.
Definition mmserv.cpp:49
int RemoveFile(char *pathname)
RemoveFile – remove a directory or file.
Definition fileserv.cpp:310
int ProcessExit()
ProcessExit – marks a process as died.
Definition thrserv.cpp:88
int NetAccept(int sockfd, sockaddr *addr, socklen_t *addrlen)
Definition netserv.cpp:123
int NetReceive(int sockfd, msghdr *msg, int flags)
Definition netserv.cpp:59
int GetProcessID()
GetProcessID – returns currently running process id.
Definition thrserv.cpp:70
int NetListen(int sockfd, int backlog)
Definition netserv.cpp:127
int ProcessWaitForTermination(int pid)
ProcessWaitForTermination – wait for termination of a child process.
Definition thrserv.cpp:103
size_t GetSystemTimerTick()
Definition thrserv.cpp:227
int PauseThread()
PauseThread – pause the currently running thread.
Definition thrserv.cpp:48
int FileIoControl(int fd, int code, void *arg)
FileIoControl – controls the file through I/O code.
Definition fileserv.cpp:372
uint64_t GetProcessHeapMem(size_t sz)
GetProcessHeapMem – get a memory from process heap.
Definition mmserv.cpp:109
int KillProcess(int proc_id)
KillProcess – forcefully kills a process.
int OpenDir(char *filename)
OpenDir – opens a directory.
Definition fileserv.cpp:434
int ProcessLoadExec(int proc_id, char *filename, int argc, char **argv)
ProcessLoadExec – loads an executable to a process slot.
Definition thrserv.cpp:136
int SendSignal(int pid, int signo)
SendSignal – sends a signal to desired process note here pid means thread id.
Definition thrserv.cpp:329
size_t GetEnvironmenBlock()
GetEnvironmentBlock – returns environment block of this process.
Definition thrserv.cpp:356
size_t WriteFile(int fd, void *buffer, size_t length)
WriteFile – write system call.
Definition fileserv.cpp:218
int DestroyTimer(int threadID)
DestroyTimer – remove the timer.
Definition timerserv.cpp:72
int CloseFile(int fd)
CloseFile – closes a general file.
Definition fileserv.cpp:326
int GetTimeOfDay(void *ptr)
GetTimeOfDay – returns the time format in unix format.
Definition timerserv.cpp:84
int OpenFile(char *filename, int mode)
OpenFile – opens a file for user process.
Definition fileserv.cpp:49
size_t ReadFile(int fd, void *buffer, size_t length)
ReadFile – reads a file into given buffer.
Definition fileserv.cpp:157
int FileSetOffset(int fd, size_t offset)
FileSetOffset – set a offset inorder to read the specific position of the file.
Definition fileserv.cpp:123
void UnmapSharedMem(uint16_t key)
UnmapSharedMem – unmap shared memory segment.
Definition mmserv.cpp:89
int NetBind(int sockfd, sockaddr *addr, socklen_t addrlen)
Definition netserv.cpp:102
void * ObtainSharedMem(uint16_t id, void *shmaddr, int shmflg)
ObtainSharedMem – obtain a shared memory.
Definition mmserv.cpp:71
int CreateDir(char *filename)
CreateDir – creates a directory.
Definition fileserv.cpp:276
int StopTimer(int threadID)
StopTimer – stop the timer.
Definition timerserv.cpp:61
int CreateUserThread(void(*entry)(), char *name)
CreateUserThread – creates an user mode thread.
Definition thrserv.cpp:236
int NetSend(int sockfd, msghdr *msg, int flags)
Definition netserv.cpp:37
int GetCurrentTime(void *ptr)
Definition thrserv.cpp:346
int SetFileToProcess(int fileno, int dest_fdidx, int proc_id)
SetFileToProcess – copies a file from one process to other.
Definition thrserv.cpp:277
int ReadDir(int dirfd, void *dirent)
ReadDir – reads a directory entry.
Definition fileserv.cpp:471
AA64Registers * AA64GetCurrentRegCtx()
Definition systable.c:78
int SetSignal(int signo, AuSigHandler handler)
Definition thrserv.cpp:216
uint16_t GetThreadID()
Definition thrserv.cpp:59