/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/util
NameSizeModeActions
alfg.h8320644editdlrm
arch.h86710644editdlrm
argv.h111640644editdlrm
basename.h30900644editdlrm
bipartite_graph.h54650644editdlrm
bipartite_graph_internal.h43660644editdlrm
bit_ops.h43980644editdlrm
cmd_line.h245790644editdlrm
crc.h45760644editdlrm
daemon_init.h16330644editdlrm
error.h35560644editdlrm
ethtool.h4170644editdlrm
fd.h29110644editdlrm
few.h22560644editdlrm
if.h71180644editdlrm
info.h112510644editdlrm
info_subscriber.h28880644editdlrm
keyval_parse.h19550644editdlrm
malloc.h47800644editdlrm
net.h46780644editdlrm
numtostr.h14430644editdlrm
opal_environ.h49430644editdlrm
opal_getcwd.h13260644editdlrm
opal_pty.h13820644editdlrm
os_dirpath.h48700644editdlrm
os_path.h32920644editdlrm
output.h215580644editdlrm
path.h55430644editdlrm
printf.h47060644editdlrm
proc.h65340644editdlrm
qsort.h10840644editdlrm
show_help.h73990644editdlrm
show_help_lex.h16860644editdlrm
stacktrace.h18760644editdlrm
strncpy.h11930644editdlrm
sys_limits.h17230644editdlrm
timings.h129120644editdlrm
uri.h30930644editdlrm
Edit: /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/util/fd.h (2911B)
/* * Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved * Copyright (c) 2009 Sandia National Laboratories. All rights reserved. * Copyright (c) 2017 Mellanox Technologies. All rights reserved. * * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ /* @file */ #ifndef OPAL_UTIL_FD_H_ #define OPAL_UTIL_FD_H_ #include "opal_config.h" BEGIN_C_DECLS /** * Read a complete buffer from a file descriptor. * * @param fd File descriptor * @param len Number of bytes to read * @param buffer Pre-allocated buffer (large enough to hold len bytes) * * @returns OPAL_SUCCESS upon success. * @returns OPAL_ERR_TIMEOUT if the fd closes before reading the full amount. * @returns OPAL_ERR_IN_ERRNO otherwise. * * Loop over reading from the fd until len bytes are read or an error * occurs. EAGAIN and EINTR are transparently handled. */ OPAL_DECLSPEC int opal_fd_read(int fd, int len, void *buffer); /** * Write a complete buffer to a file descriptor. * * @param fd File descriptor * @param len Number of bytes to write * @param buffer Buffer to write from * * @returns OPAL_SUCCESS upon success. * @returns OPAL_ERR_IN_ERRNO otherwise. * * Loop over writing to the fd until len bytes are written or an error * occurs. EAGAIN and EINTR are transparently handled. */ OPAL_DECLSPEC int opal_fd_write(int fd, int len, const void *buffer); /** * Convenience function to set a file descriptor to be close-on-exec. * * @param fd File descriptor * * @returns OPAL_SUCCESS upon success (or if the system does not * support close-on-exec behavior). * @returns OPAL_ERR_IN_ERRNO otherwise. * * This is simply a convenience function because there's a few steps * to setting a file descriptor to be close-on-exec. */ OPAL_DECLSPEC int opal_fd_set_cloexec(int fd); /** * Convenience function to check if fd point to an accessible regular file. * * @param fd File descriptor * * @returns true if "fd" points to a regular file. * @returns false otherwise. */ OPAL_DECLSPEC bool opal_fd_is_regular(int fd); /** * Convenience function to check if fd point to an accessible character device. * * @param fd File descriptor * * @returns true if "fd" points to a regular file. * @returns false otherwise. */ OPAL_DECLSPEC bool opal_fd_is_chardev(int fd); /** * Convenience function to check if fd point to an accessible block device. * * @param fd File descriptor * * @returns true if "fd" points to a regular file. * @returns false otherwise. */ OPAL_DECLSPEC bool opal_fd_is_blkdev(int fd); /** * Convenience function to get a string name of the peer on the other * end of this internet socket. * * @param fd File descriptor of an AF_INET/AF_INET6 socket * * @returns resolvable IP name, or "a.b.c.d". This string must be freed by the caller. */ OPAL_DECLSPEC const char *opal_fd_get_peer_name(int fd); END_C_DECLS #endif