#include <unistd.h>
#include <stddef.h>
Go to the source code of this file.
Functions | |
int | hipcPosixReadReady (int fd) |
Check a file descriptor is ready to read by using select(2) and returns the result of select(2). More... | |
ssize_t | hipcPosixReadExactly (const int fd, void *buf, const size_t count) |
Read count bytes from fd by using read(2). More... | |
ssize_t | hipcPosixWriteExactly (const int fd, void const *buf, const size_t count) |
Writes count bytes to fd by using write(2). More... | |
int hipcPosixReadReady | ( | int | fd | ) |
Check a file descriptor is ready to read by using select(2) and returns the result of select(2).
fd | file descriptor |
1 | fd is at the ready. |
0 | fd is not at the ready. |
-1 | means occurrence of an error. |
Definition at line 17 of file posix_ioutils.c.
ssize_t hipcPosixReadExactly | ( | const int | fd, |
void * | buf, | ||
const size_t | count | ||
) |
Read count
bytes from fd
by using read(2).
count
must be less than or equal to SSIZE_MAX
, otherwise the result is unspecified.
fd | File descriptor |
buf | Buffer into which the bytes are read |
count | Number of the bytes to be read. |
>0 | The number of the bytes that have been read |
0 | The fd is at the end of the file or count is 0. |
-1 | means occurrence of an error, and errno is set by read(2). |
Definition at line 41 of file posix_ioutils.c.
Referenced by hipcPosixReadMsg(), and hipcUsocRead().
ssize_t hipcPosixWriteExactly | ( | const int | fd, |
void const * | buf, | ||
const size_t | count | ||
) |
Writes count
bytes to fd
by using write(2).
count
must be less than or equal to SSIZE_MAX
, otherwise the result is unspecified.
fd | File descriptor |
buf | Buffer from which bytes are written |
count | Number of bytes to be written. |
>=0 | Number of bytes that have been written |
-1 | means occurrence of an error, and errno is set by write(2). |
Definition at line 71 of file posix_ioutils.c.
Referenced by hipcPosixWriteMsg(), and hipcUsocWrite().