System Call Format

µT-Kernel adopts C as the standard high-level language, and standardizes interfaces for system call execution from C language routines.

The method for interfacing at the assembly language level is implementation-dependent and not standardized here. Calling by means of a C language interface is recommended even when an assembly language program is created. In this way, portability is assured for programs written in assembly language even if the OS changes, as long as the CPU is the same.

The following common rules are established for system call interfaces.

  • All system calls are defined as C functions.
  • A function return code of 0 or a positive value indicates normal completion, while negative values are used for error codes.

The implementation method of system call interfaces shall be implementation-defined. For example, implementations using C language’s macro, inline function, and inline assembler, etc. are possible.

[Difference with T-Kernel]

In T-Kernel, system call interfaces are specified to be as a library, but in µT-Kernel, it is implementation-defined. This is because, in µT-Kernel, performance efficiency takes precedence over portability among different compilers.

Comments

Click here to Post a Comment