Top "System-calls" questions

A system call is used by programs to request services from the operating system's kernel.

How to Dynamically Allocate Memory Using Assembly and System Calls Under Linux

I'm looking for some good code examples of dynamic memory allocation using an assembly language under Linux and using system …

linux assembly system-calls dynamic-memory-allocation
How to access the system call from user-space?

I read some paragraphs in LKD1 and I just cannot understand the contents below: Accessing the System Call from User-Space …

linux system-calls
How to figure out if a file is a link?

I have the below code only a part of it is shown here and I am checking if a the …

c linux symlink system-calls stat
Magic numbers of the Linux reboot() system call

The Linux Programming Interface has an exercise in Chapter 3 that goes like this: When using the Linux-specific reboot() system call …

linux linux-kernel system-calls
How do I reimplement (or wrap) a syscall function on Linux?

Suppose I want to completely take over the open() system call, maybe to wrap the actual syscall and perform some …

c linux system-calls libc
How are sbrk/brk implemented in Linux?

I was thinking about how the Linux kernel implements system calls and I was wondering if someone could give me …

linux system-calls sbrk brk
How to invoke a system call via syscall or sysenter in inline assembly?

How can we implement the system call using sysenter/syscall directly in x86 Linux? Can anybody provide help? It would …

linux gcc x86 system-calls inline-assembly
How to retrieve the user name from the user ID

I am implementing the (ls) command on Unix while learning from a book. During the coding part of my implementation …

c unix system-calls file-descriptor stat
Any benefit in using WEXITSTATUS macro in C over division by 256 on exit() status?

I was doing an exercise for university where I had to return a value with exit, that value was actually …

c exit system-calls
C++ gettid() was not declared in this scope

A simple program is: I would like to get the thread ID of both of the threads using this gettid …

c++11 linux-kernel system-calls boost-thread