Add Syscall: Exit, PutChar, GetCar, PutString, GetString
This commit is contained in:
parent
6f405265a5
commit
80fc250109
15 changed files with 359 additions and 17 deletions
|
@ -20,18 +20,23 @@
|
|||
/* system call codes -- used by the stubs to tell the kernel which system call
|
||||
* is being asked for
|
||||
*/
|
||||
#define SC_Halt 0
|
||||
#define SC_Exit 1
|
||||
#define SC_Exec 2
|
||||
#define SC_Join 3
|
||||
#define SC_Create 4
|
||||
#define SC_Open 5
|
||||
#define SC_Read 6
|
||||
#define SC_Write 7
|
||||
#define SC_Close 8
|
||||
#define SC_Fork 9
|
||||
#define SC_Yield 10
|
||||
|
||||
#define SC_Halt 0
|
||||
#define SC_Exit 1
|
||||
#define SC_Exec 2
|
||||
#define SC_Join 3
|
||||
#define SC_Create 4
|
||||
#define SC_Open 5
|
||||
#define SC_Read 6
|
||||
#define SC_Write 7
|
||||
#define SC_Close 8
|
||||
#define SC_Fork 9
|
||||
#define SC_Yield 10
|
||||
#ifdef CHANGED
|
||||
#define SC_PutChar 11 // My first SysCall :')
|
||||
#define SC_PutString 12
|
||||
#define SC_GetChar 13
|
||||
#define SC_GetString 14
|
||||
#endif
|
||||
#ifdef IN_USER_MODE
|
||||
|
||||
// LB: This part is read only on compiling the test/*.c files.
|
||||
|
@ -130,6 +135,13 @@ void Fork (void (*func) ());
|
|||
*/
|
||||
void Yield ();
|
||||
|
||||
#ifdef CHANGED
|
||||
void PutChar (char c);
|
||||
void PutString (char * s);
|
||||
void GetChar(char c);
|
||||
void GetString(char * s, int n );
|
||||
#endif // CHANGED
|
||||
|
||||
#endif // IN_USER_MODE
|
||||
|
||||
#endif /* SYSCALL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue