![]() ![]() Of course, relying on such behavior is not portable. Until recently, the x86 architecture was one such system. On those systems, PROT_READ implies PROT_EXEC. In that case, the processor may have only a single “read” flag. It is common, for example, for a processor to not differentiate between the actions of reading and executing. While POSIX defines three protection bits (read, write, and execute), some architectures support only a subset of these. Protection Flags, Architectures, and Security We will cover the functions malloc() and free() in Chapter 9. The readv() and writev() functions behave the same as read() and write(), respectively, except that multiple buffers are read from or written to.Įach iovec structure describes an independent disjoint buffer, which is called a segment: #include struct iovec free ( events ) The writev() function writes at most count segments from the buffers described by iov into the file descriptor fd: #include ssize_t writev ( int fd, const struct iovec * iov, int count ) The readv() function reads count segments from the file descriptor fd into the buffers described by iov: #include ssize_t readv ( int fd, const struct iovec * iov, int count ) ![]() The Linux implementation satisfies all of the goals listed in the previous section. POSIX 1003.1-2001 defines, and Linux implements, a pair of system calls that implement scatter/gather I/O.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |