Chapter 10. Blocking Kernel System Calls

The following are the kernel system calls (syscalls) that actually block continued pthreads. There are numerous library routines, such as printf, that can use one of these blocking system calls.

It would be impractical here to list all library routines which utilize a blocking syscall. Nevertheless, as a user you should know, for example, that if you call the printf library routine it eventually calls writev(), a blocking system call, and thus may block continued pthreads.

accept
 

accept a connection on a socket

close
 

close a file descriptor

creat
 

create a new file or rewrite an existing one

dmi
 

SGI specific. Used to implement the interface defined in X/Open document Systems Management: Data Storage Managment (XDSM) API .

fcntl
 

File and descriptor control. Provides for control over open descriptors.

fsync
 

synchronize a file's in-memory state with that on the physical medium

getmsg / getpmsg
 

get next message off a stream

ioctl
 

Control device. Performs a variety of control functions on devices and streams.

lockf
 

Record locking on files. Allows sections of a file to be locked.

mq_open
 

open/create a message queue

msgsnd / msgrcv
 

message send and message receive

msync
 

synchronize memory with physical storage

nanosleep
 

high resolution sleep

open
 

open for reading and writing

pause
 

suspend process until signal is received

poll
 

input/output multiplexing

putmsg / putpmsg
 

send a message on a stream

read / readv / pread
 

read from a file

recv / recvfrom / recvmsg
 

receive a message from a socket

select
 

synchronous I/O multiplexing

semget / semctl / semop
 

semaphore handling

send / sendto / sendmsg
 

send a message from a socket

sginap
 

times sleep and processor yield function

write / writev / pwrite
 

write on a file