FLOSS on NonStop User Manual

Table 4 FLOSS APIs
DescriptionAPI prototypeAPI name
floss_execv is a wrapper around
floss_execve.
int floss_execv(const char
*path, char * const argv[])
floss_execv
floss_execve is a wrapper around
tdm_execve, which load balances the
executed processes by distributing them
on different CPUs using pseudo random
technique.
int floss_execve(const char
*path, char * const argv[],
char * const envp[])
floss_execve
floss_execvp is a wrapper around
tdm_execvep. This call performs load
balancing as described in
floss_execve.
int floss_execvp(const char
*file, char * const argv[])
floss_execvp
floss_write is a wrapper around
write system call. This call provides
writes greater than SSIZE_MAX by
splitting them into multiple writes of
SSIZE_MAX size.
ssize_t floss_write(int
filedes, const void *buffer,
size_t nbytes)
floss_write
floss_read is a wrapper around
read system call. This call provides
reads greater than SSIZE_MAX by
splitting them into multiple reads of
SSIZE_MAX size.
ssize_t floss_read(int
filedes, void *buffer,
size_t nbytes)
floss_read
floss_writev splits writes greater
than SSIZE_MAX into SSIZE_MAX
chunks. For more information, see
writev system call manpage.
ssize_t floss_writev(int
filedes, struct iovec *iov,
size_t iov_count);
floss_writev
floss_select is wrapper around
select(2) command. This call
attempts to work around OSS returning
ENOTSUP for tty-based file descriptors.
floss_select performs these steps:
1. Calls select(2).
2. If select(2) returns –1 and errno is
set to ENOTSUP, then floss_select(2)
removes the tty-based file descriptors
from the containing set or sets and
issues a nonblocking select(2).
3. If the second select(2) returns 0,
which means none of the
non-tty-based file descriptors are
ready, –1 is returned by floss_select
and errno is set to ENOTSUP.
4. If neither of the above conditions are
true, then floss_select simply
returns the value returned by the call
to select(2).
int floss_select(int nfds,
fd_set *readfds, fd_set
*writefds, fd_set *errorfds,
struct timeval *timeout)
floss_select
FLOSS implementation of open source
truncate (2) based on open(2) and
ftruncate(2).
int floss_truncate(const
char *path, off_t length);
floss_truncate
FLOSS fork ensures that errno is set to
0 when the fork(2) succeeds. For more
information, see the fork(2) manpage.
pid_t floss_fork(void);floss_fork
FLOSS implementation of adjtime(2)
based on SETSYSTEMCLOCK. For more
information, see the SETSYSTEMCLOCK
manpage.
int floss_adjtime(struct
timeval *delta, struct
timeval *old_delta);
floss_adjtime
15