A5 System Calls

The mechanism for issuing system calls to perform a controlled switch from userspace to kernel space differs on all supported platforms. However, a standard file named <asm-arch/unistd.h> is responsible for the following two aspects relevant to system calls:

□ It defines pre-processor constants to link the descriptors of all system calls with symbolic constants. The constants have names such as_NR_chdir and_NR_send. Because the individual architectures do their best to remain compatible with the descriptors of the specific native operating system (for example, OSF/1 on Alpha, or Solaris on Sparc), the numeric values differ from architecture to architecture.

□ It defines functions to invoke system calls from within the kernel itself. Generally, a pre-processor mechanism is used for this purpose together with an inline assembler for automatic generation.

Continue reading here: A6 String Processing

Was this article helpful?

0 0