UbixOS V2  2.0
syscall.c File Reference
#include <ubixos/syscall.h>
#include <ubixos/syscalls.h>
#include <ubixos/sched.h>
#include <sys/types.h>
#include <ubixos/exec.h>
#include <sys/elf.h>
#include <ubixos/endtask.h>
#include <ubixos/time.h>
#include <sys/video.h>
#include <sys/trap.h>
#include <vfs/file.h>
#include <ubixfs/ubixfs.h>
#include <string.h>
#include <lib/kprintf.h>
#include <lib/kmalloc.h>
#include <ubixos/vitals.h>
#include <mpi/mpi.h>
#include <vmm/vmm.h>
Include dependency graph for syscall.c:

Go to the source code of this file.

Data Structures

struct  _UbixUser
 

Typedefs

typedef struct _UbixUser UbixUser
 

Functions

 asm (".globl _sysCallNew \n" "_sysCallNew: \n" " pusha \n" " push %ss \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " cmpl totalCalls,%eax \n" " jae invalidSysCallNew \n" " mov %esp,%ebx \n" " add $12,%ebx \n" " push (%ebx) \n" " call *systemCalls(,%eax,4) \n" " add $4,%esp \n" " jmp doneNew \n" "invalidSysCallNew: \n" " call InvalidSystemCall \n" "doneNew: \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " pop %ss \n" " popa \n" " iret \n")
 
void invalidCall (int sys_call)
 
void InvalidSystemCall ()
 
void sysAddModule ()
 
void sysAuth (UbixUser *uu)
 
void sysCheckPid (int pid, int *ptr)
 
void sysExit (int status)
 
void sysGetCwd (char *data, int len)
 
void sysGetDrives (uInt32 *ptr)
 
void sysGetFreePage (long *ptr, int count, int type)
 
void sysGetGid (int *gid)
 
void sysGetpid (int *pid)
 
void sysGetTime (uInt32 *ptr)
 
void sysGetUid (int *uid)
 
void sysGetUptime (uInt32 *ptr)
 
void sysPasswd (char *passwd)
 
void sysRmModule ()
 
void sysSchedYield ()
 
void sysSetGid (int gid, int *status)
 
void sysSetUid (int uid, int *status)
 
void sysStartSDE ()
 

Typedef Documentation

◆ UbixUser

typedef struct _UbixUser UbixUser

Definition at line 87 of file syscall.c.

Function Documentation

◆ asm()

asm ( ".globl _sysCallNew \n" "_sysCallNew: \n" " pusha \n" " push %ss \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " cmpl  totalCalls,
%eax \n" " jae invalidSysCallNew \n" " mov %  esp,
%ebx \n" " add  $12,
%ebx \n" " push(%ebx) \n" " call *systemCalls(,%eax, 4) \n" " add  $4,
%esp \n" " jmp doneNew \n" "invalidSysCallNew:\n" " call InvalidSystemCall \n" "doneNew:\n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " pop %ss \n" " popa \n" " iret \n"   
)

◆ invalidCall()

void invalidCall ( int  sys_call)

Definition at line 238 of file syscall.c.

References kprintf(), and sys_call().

Here is the call graph for this function:

◆ InvalidSystemCall()

void InvalidSystemCall ( )

Definition at line 82 of file syscall.c.

References kprintf().

Here is the call graph for this function:

◆ sysAddModule()

void sysAddModule ( )

Definition at line 117 of file syscall.c.

◆ sysAuth()

void sysAuth ( UbixUser uu)

Definition at line 97 of file syscall.c.

References kprintf().

Here is the call graph for this function:

◆ sysCheckPid()

void sysCheckPid ( int  pid,
int *  ptr 
)

Definition at line 173 of file syscall.c.

References schedFindTask(), and taskStruct::state.

Here is the call graph for this function:

◆ sysExit()

void sysExit ( int  status)

Definition at line 169 of file syscall.c.

◆ sysGetCwd()

void sysGetCwd ( char *  data,
int  len 
)

Definition at line 216 of file syscall.c.

References _current, osInfo::cwd, taskStruct::oInfo, and sprintf().

Here is the call graph for this function:

◆ sysGetDrives()

void sysGetDrives ( uInt32 ptr)

Definition at line 198 of file syscall.c.

◆ sysGetFreePage()

void sysGetFreePage ( long *  ptr,
int  count,
int  type 
)

Definition at line 188 of file syscall.c.

References _current, taskStruct::id, VM_TASK, and VM_THRD.

◆ sysGetGid()

void sysGetGid ( int *  gid)

Definition at line 137 of file syscall.c.

References _current, and taskStruct::gid.

◆ sysGetpid()

void sysGetpid ( int *  pid)

Definition at line 125 of file syscall.c.

References _current, and taskStruct::id.

◆ sysGetTime()

void sysGetTime ( uInt32 ptr)

Definition at line 210 of file syscall.c.

References systemVitals, vitalsStruct::sysUptime, and vitalsStruct::timeStart.

◆ sysGetUid()

void sysGetUid ( int *  uid)

Definition at line 131 of file syscall.c.

References _current, and taskStruct::uid.

◆ sysGetUptime()

void sysGetUptime ( uInt32 ptr)

Definition at line 204 of file syscall.c.

References systemVitals, and vitalsStruct::sysTicks.

◆ sysPasswd()

void sysPasswd ( char *  passwd)

Definition at line 112 of file syscall.c.

References _current, kprintf(), and taskStruct::uid.

Here is the call graph for this function:

◆ sysRmModule()

void sysRmModule ( )

Definition at line 121 of file syscall.c.

◆ sysSchedYield()

void sysSchedYield ( )

Definition at line 222 of file syscall.c.

References sched_yield().

Here is the call graph for this function:

◆ sysSetGid()

void sysSetGid ( int  gid,
int *  status 
)

Definition at line 156 of file syscall.c.

◆ sysSetUid()

void sysSetUid ( int  uid,
int *  status 
)

Definition at line 143 of file syscall.c.

◆ sysStartSDE()

void sysStartSDE ( )

Definition at line 226 of file syscall.c.