#include "copyright.h"Go to the source code of this file.
Defines | |
| #define | SYSCALLS_H |
| #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_ThreadFork 9 |
| #define | SC_ThreadYield 10 |
| #define | ConsoleInput 0 |
| #define | ConsoleOutput 1 |
Typedefs | |
| typedef int | SpaceId |
| typedef int | OpenFileId |
Functions | |
| void | Halt () |
| void | Exit (int status) |
| SpaceId | Exec (char *name) |
| int | Join (SpaceId id) |
| void | Create (char *name) |
| OpenFileId | Open (char *name) |
| void | Write (char *buffer, int size, OpenFileId id) |
| int | Read (char *buffer, int size, OpenFileId id) |
| void | Close (OpenFileId id) |
| void | ThreadFork (void(*func)()) |
| void | ThreadYield () |
|
|
when an address space starts up, it has two open files, representing keyboard input and display output (in UNIX terms, stdin and stdout). Read and Write can be used directly on these, without first opening the console device. Definition at line 86 of file syscall.h. Referenced by SynchConsoleInput::SynchConsoleInput().
|
|
|
Definition at line 87 of file syscall.h. Referenced by SynchConsoleOutput::SynchConsoleOutput().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
system call codes -- used by the stubs to tell the kernel which system call is being asked for |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A unique identifier for an open Nachos file. |
|
|
A unique identifier for an executing user program (address space) |
|
|
Close the file, we're done reading and writing to it. Referenced by ConsoleInput::~ConsoleInput(), ConsoleOutput::~ConsoleOutput(), and Disk::~Disk().
|
|
|
Create a Nachos file, with "name" |
|
|
Run the executable, stored in the Nachos file "name", and return the address space identifier |
|
|
Exit Quit without dropping core. Definition at line 131 of file sysdep.cc. Referenced by ThreadedKernel::~ThreadedKernel().
|
|
|
Stop Nachos, and print out performance stats Referenced by ExceptionHandler(), and NetKernel::Run().
|
|
|
Only return once the the user program "id" has finished. Return the exit status. |
|
|
Open the Nachos file "name", and return an "OpenFileId" that can be used to read and write to the file. Referenced by AddrSpace::Load().
|
|
|
Read "size" bytes from the open file into "buffer". Return the number of bytes actually read -- if the open file isn't long enough, or if it is an I/O device, and there aren't enough characters to read, return whatever is available (for I/O devices, you should always wait until you can return at least one character). Referenced by ConsoleInput::CallBack(), Disk::Disk(), and Disk::ReadRequest().
|
|
|
|
|
|
|
|
|
Write "size" bytes from "buffer" to the open file. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001