#include <syscall.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include "startup.h"
#include "time.h"
#include <sys/types.h>
#include <sys/time.h>
Include dependency graph for syscall.c:

Functions | |
| register char *stack_ptr | asm ("SP") |
| int | _open (const char *file, int flags, int mode) |
| Code for open. | |
| int | _close (int fd) |
| Close function. | |
| int | _write (int fd, const void *buf, size_t cnt) |
| Write function call the device own write. | |
| int | _read (int fd, void *buf, size_t cnt) |
| Read function call the device own read. | |
| int | _fstat (int fd, struct stat *pstat) |
| int | _lseek (int fd, _off_t offset, int whence) |
| int | _isatty (int file) |
| void * | _sbrk (int incr) |
| int | _stat (const char *fname, struct stat *st) |
| int | _link (const char *existing, const char *new) |
| int | _unlink (const char *path) |
| void | _raise (void) |
| int | _system (const char *s) |
| int | _rename (const char *oldpath, const char *newpath) |
| static int | __setup_argv_for_main (int argc) |
| int | __setup_argv_and_call_main () |
| void | _exit (int n) |
| int | _kill (int n, int m) |
| int | _getpid (int n) |
| int | _gettimeofday (struct timeval *tp, void *tzvp) |
| The gettimeofday() function shall obtain the current time, expressed as seconds and microseconds since epoch, and store it in the timeval structure pointed to by tp. | |
Variables | |
| const devoptab_t | console_devoptab |
| Console table. | |
| int | errno |
| const devoptab_t * | devoptab_list [] |
| Instantiation of the device operation All new devices will be added here. | |
Target: TLL6527v1.1 Compiler: GCC
| int __setup_argv_and_call_main | ( | ) |
| static int __setup_argv_for_main | ( | int | argc | ) | [inline, static] |
| int _close | ( | int | fd | ) |
Close function.
| fd | file descriptor or index to the device opt list |
| void _exit | ( | int | n | ) |
| int _fstat | ( | int | fd, | |
| struct stat * | pstat | |||
| ) |
| fd | ||
| stat |
| int _getpid | ( | int | n | ) |
| int _gettimeofday | ( | struct timeval * | tp, | |
| void * | tzvp | |||
| ) |
The gettimeofday() function shall obtain the current time, expressed as seconds and microseconds since epoch, and store it in the timeval structure pointed to by tp.
Timezone is not used.
| int _isatty | ( | int | file | ) |
| int _kill | ( | int | n, | |
| int | m | |||
| ) |
| int _link | ( | const char * | existing, | |
| const char * | new | |||
| ) |
| int _lseek | ( | int | fd, | |
| _off_t | offset, | |||
| int | whence | |||
| ) |
| fd | ||
| offset | ||
| whence |
| int _open | ( | const char * | file, | |
| int | flags, | |||
| int | mode | |||
| ) |
Code for open.
The standard IO will not be calling open.
| file | file name | |
| flags | flags for opening the file unused at present | |
| mode | mode of opening the file unused |
| void _raise | ( | void | ) |
| int _read | ( | int | fd, | |
| void * | buf, | |||
| size_t | cnt | |||
| ) |
Read function call the device own read.
The deviceoptab_list is used as a table and the function is called;
| fd | file descriptor and is an index into the devoptab_list | |
| buf | buffer to read into | |
| cnt | size of the buffer |
| int _rename | ( | const char * | oldpath, | |
| const char * | newpath | |||
| ) |
| void* _sbrk | ( | int | incr | ) |
| int _stat | ( | const char * | fname, | |
| struct stat * | st | |||
| ) |
| int _system | ( | const char * | s | ) |
| int _unlink | ( | const char * | path | ) |
| int _write | ( | int | fd, | |
| const void * | buf, | |||
| size_t | cnt | |||
| ) |
Write function call the device own write.
The deviceoptab_list is used as a table and the function is called;
| fd | file descriptor and is an index into the devoptab_list | |
| buf | buffer to write | |
| cnt | size of the buffer |
| register char* stack_ptr asm | ( | "SP" | ) |
| const devoptab_t console_devoptab |
Console table.
| const devoptab_t* devoptab_list[] |
Initial value:
{
&console_devoptab,
&console_devoptab,
&console_devoptab,
0
}
| int errno |
1.4.7