asterinas/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/fully_covered.scml

31 lines
985 B
Plaintext

// Duplicate a file descriptor
dup(oldfd);
dup2(oldfd, newfd);
dup3(oldfd, newfd, flags);
// Monitor multiplexed I/O with signal safety and precise timeout handling
pselect6(nfds, readfds, writefds, exceptfds, timeout, sigmask);
// Transfer data between file descriptors
sendfile(out_fd, in_fd, offset, count);
// Synchronize a file's in-core state with storage device
fsync(fd);
fdatasync(fd);
// Open an epoll file descriptor
epoll_create(size);
epoll_create1(flags = EPOLL_CLOEXEC);
// Create a file descriptor for accepting signals
signalfd(fd, mask, sizemask);
signalfd4(fd, mask, sizemask, flags = SFD_NONBLOCK | SFD_CLOEXEC);
// Wait for I/O event on an epoll file descriptor
epoll_wait(epfd, events, maxevents, timeout);
epoll_pwait(epfd, events, maxevents, timeout, sigmask);
epoll_pwait2(epfd, events, maxevents, timeout, sigmask);
// Wait for I/O event on the file descriptors set in read, write or except bitmaps
select(nfds, readfds, writefds, exceptfds, timeout);