1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
mmap
Maps a file/device into memory. Args: addr (hint for mapping location), length (bytes to map), prot (PROT_READ/PROT_WRITE), flags (MAP_SHARED/MAP_PRIVATE), fd (file descriptor), offset (file offset). Returns mapped address.
munmap
Unmaps a memory region. Args: addr (from mmap), length (bytes to unmap). Returns 0/-1.
kill
Sends signal sig to process pid. Returns 0/-1.
sigemptyset
Initializes empty signal set set. Returns 0/-1.
sigfillset
Fills set with all signals. Returns 0/-1.
sigaddset
Adds signal signum to set set. Returns 0/-1.
sigdelset
Removes signal signum from set set. Returns 0/-1.
sigismember
Checks if signum is in set. Returns 1 (yes)/0 (no)/-1 (error).
sigprocmask
Modifies blocked signals. how: SIG_BLOCK/SIG_UNBLOCK/SIG_SETMASK. set/oldset input/output sets. Returns 0/-1.
sigaction
Sets handler for signal sig. act (new settings), oact (old settings). Returns 0/-1.
pause
Waits for any signal. Always returns -1 (interrupted by signal).
sigsuspend
Temporarily replaces signal mask with sigmask and waits. Returns -1 (interrupted).
sigwait
Blocks until signal in sigmask arrives. Stores signal in signo. Returns 0/-1.
pipe
Creates pipe. filedes[0] (read end), filedes[1] (write end). Returns 0/-1.
poll
Monitors multiple file descriptors. fds (array of structs), nfds (count), timeout (ms). Returns # ready FDs/-1.
shmget
Allocates shared memory segment. key (identifier), size (bytes), shmflg (IPC_CREAT|permissions). Returns shmid/-1.
shmat
Attaches shared memory. shmid (from shmget), shmaddr (hint, usually NULL), shmflg (flags). Returns mapped address/(void*)-1.
shmdt
Detaches shared memory at shmaddr. Returns 0/-1.
shmctl
Controls shared memory. shmid, cmd (IPC_RMID to delete), buf (struct for info). Returns 0/-1.
ftok
Generates key for IPC. pathname (existing file), proj_id (unique byte). Returns key/-1.