Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

5.3.  Standard System Call Implementations

5.3.1. Error Handling
5.3.2. The Global Environment, environ
5.3.3. Exit a program, _exit
5.3.4. Closing a file, close
5.3.5. Transfer Control to a New Process, execve
5.3.6. Create a new process, fork
5.3.7. Provide the Status of an Open File, fstat
5.3.8. Get the Current Process ID, getpid
5.3.9. Determine the Nature of a Stream, isatty
5.3.10. Send a Signal, kill
5.3.11. Rename an existing file, link
5.3.12. Set Position in a File, lseek
5.3.13. Open a file, open
5.3.14. Read from a File, read
5.3.15. Allocate more Heap, sbrk
5.3.16. Status of a File (by Name), stat
5.3.17. Provide Process Timing Information, times
5.3.18. Remove a File's Directory Entry, unlink
5.3.19. Wait for a Child Process, wait
5.3.20. Write to a File, write

The simplest way to provide a board support package is to implement the 18 system calls in non-reentrant fashion. For many bare metal implementations this is sufficient.

The simplest possible BSP supports just output to standard output and non input. We give the minimal implementation for such a system.

Where appropriate, we also show the OpenRISC 1000  implementation as a practical example.

This section duplicates much of the information found in the newlib libc documentation [1]. It is included here for completeness.

Embecosm divider strip