µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.
types.h File Reference
#include <sys/types.h>
#include <sys/select.h>
#include <cmsis-plus/posix/dirent.h>
#include <cmsis-plus/posix/sys/socket.h>
#include <cmsis-plus/posix/termios.h>

Go to the source code of this file.

Namespaces

 os
 System namespace.
 
 os::posix
 

Types

using os::posix::file_descriptor_t = int
 

Functions

int __posix_accept (int socket, struct sockaddr *address, socklen_t *address_len)
 
int __posix_bind (int socket, const struct sockaddr *address, socklen_t address_len)
 
int __posix_chdir (const char *path)
 
int __posix_chmod (const char *path, mode_t mode)
 
int __posix_chown (const char *path, uid_t owner, gid_t group)
 
clock_t __posix_clock (void)
 
int __posix_close (int fildes)
 
int __posix_closedir (DIR *dirp)
 
int __posix_connect (int socket, const struct sockaddr *address, socklen_t address_len)
 
int __posix_execve (const char *path, char *const argv[], char *const envp[])
 
int __posix_fcntl (int fildes, int cmd,...)
 
pid_t __posix_fork (void)
 
int __posix_fstat (int fildes, struct stat *buf)
 
int __posix_fstatvfs (int fildes, struct statvfs *buf)
 
int __posix_fsync (int fildes)
 
int __posix_ftruncate (int fildes, off_t length)
 
char * __posix_getcwd (char *buf, size_t size)
 
int __posix_getpeername (int socket, struct sockaddr *address, socklen_t *address_len)
 
pid_t __posix_getpid (void)
 
int __posix_getsockname (int socket, struct sockaddr *address, socklen_t *address_len)
 
int __posix_getsockopt (int socket, int level, int option_name, void *option_value, socklen_t *option_len)
 
int __posix_gettimeofday (struct timeval *ptimeval, void *ptimezone)
 
int __posix_ioctl (int fildes, int request,...)
 
int __posix_isatty (int fildes)
 Test for a terminal device. More...
 
int __posix_kill (pid_t pid, int sig)
 
int __posix_link (const char *existing, const char *_new)
 
int __posix_listen (int socket, int backlog)
 
off_t __posix_lseek (int fildes, off_t offset, int whence)
 
int __posix_mkdir (const char *path, mode_t mode)
 
int __posix_open (const char *path, int oflag,...)
 Open file relative to directory file descriptor. More...
 
DIR__posix_opendir (const char *dirname)
 
int __posix_raise (int sig)
 
ssize_t __posix_read (int fildes, void *buf, size_t nbyte)
 
struct dirent__posix_readdir (DIR *dirp)
 
int __posix_readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
 
ssize_t __posix_readlink (const char *path, char *buf, size_t bufsize)
 
ssize_t __posix_recv (int socket, void *buffer, size_t length, int flags)
 
ssize_t __posix_recvfrom (int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len)
 
ssize_t __posix_recvmsg (int socket, struct msghdr *message, int flags)
 
int __posix_rename (const char *oldfn, const char *newfn)
 
void __posix_rewinddir (DIR *dirp)
 
int __posix_rmdir (const char *path)
 
int __posix_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
 
ssize_t __posix_send (int socket, const void *buffer, size_t length, int flags)
 
ssize_t __posix_sendmsg (int socket, const struct msghdr *message, int flags)
 
ssize_t __posix_sendto (int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len)
 
int __posix_setsockopt (int socket, int level, int option_name, const void *option_value, socklen_t option_len)
 
int __posix_shutdown (int socket, int how)
 
int __posix_sockatmark (int socket)
 
int __posix_socket (int domain, int type, int protocol)
 
int __posix_socketpair (int domain, int type, int protocol, int socket_vector[2])
 
int __posix_stat (const char *path, struct stat *buf)
 
int __posix_statvfs (const char *path, struct statvfs *buf)
 
int __posix_symlink (const char *existing, const char *_new)
 
void __posix_sync (void)
 
int __posix_system (const char *command)
 
int __posix_tcdrain (int fildes)
 
int __posix_tcflush (int fildes, int queue_selector)
 
int __posix_tcgetattr (int fildes, struct termios *termios_p)
 
int __posix_tcsendbreak (int fildes, int duration)
 
int __posix_tcsetattr (int fildes, int optional_actions, const struct termios *termios_p)
 
clock_t __posix_times (struct tms *buf)
 
int __posix_truncate (const char *path, off_t length)
 
int __posix_unlink (const char *name)
 
int __posix_utime (const char *path, const struct utimbuf *times)
 
pid_t __posix_wait (int *stat_loc)
 
ssize_t __posix_write (int fildes, const void *buf, size_t nbyte)
 
ssize_t __posix_writev (int fildes, const struct iovec *iov, int iovcnt)
 
void os_startup_initialize_args (int *p_argc, char ***p_argv)
 

Variables

constexpr file_descriptor_t os::posix::no_file_descriptor = -1
 

Function Documentation

◆ __posix_accept()

int __posix_accept ( int  socket,
struct sockaddr address,
socklen_t address_len 
)

Definition at line 582 of file c-syscalls-posix.cpp.

◆ __posix_bind()

int __posix_bind ( int  socket,
const struct sockaddr address,
socklen_t  address_len 
)

Definition at line 595 of file c-syscalls-posix.cpp.

◆ __posix_chdir()

int __posix_chdir ( const char *  path)

Definition at line 839 of file c-syscalls-posix.cpp.

◆ __posix_chmod()

int __posix_chmod ( const char *  path,
mode_t  mode 
)

Definition at line 432 of file c-syscalls-posix.cpp.

◆ __posix_chown()

int __posix_chown ( const char *  path,
uid_t  owner,
gid_t  group 
)

Definition at line 912 of file c-syscalls-posix.cpp.

◆ __posix_clock()

clock_t __posix_clock ( void  )

Definition at line 856 of file c-syscalls-posix.cpp.

◆ __posix_close()

int __posix_close ( int  fildes)

Definition at line 108 of file c-syscalls-posix.cpp.

◆ __posix_closedir()

int __posix_closedir ( DIR dirp)

Definition at line 537 of file c-syscalls-posix.cpp.

◆ __posix_connect()

int __posix_connect ( int  socket,
const struct sockaddr address,
socklen_t  address_len 
)

Definition at line 607 of file c-syscalls-posix.cpp.

◆ __posix_execve()

int __posix_execve ( const char *  path,
char *const  argv[],
char *const  envp[] 
)

Definition at line 863 of file c-syscalls-posix.cpp.

◆ __posix_fcntl()

int __posix_fcntl ( int  fildes,
int  cmd,
  ... 
)

Definition at line 339 of file c-syscalls-posix.cpp.

◆ __posix_fork()

pid_t __posix_fork ( void  )

Definition at line 870 of file c-syscalls-posix.cpp.

◆ __posix_fstat()

int __posix_fstat ( int  fildes,
struct stat buf 
)

Definition at line 357 of file c-syscalls-posix.cpp.

◆ __posix_fstatvfs()

int __posix_fstatvfs ( int  fildes,
struct statvfs buf 
)

Definition at line 369 of file c-syscalls-posix.cpp.

◆ __posix_fsync()

int __posix_fsync ( int  fildes)

Definition at line 409 of file c-syscalls-posix.cpp.

◆ __posix_ftruncate()

int __posix_ftruncate ( int  fildes,
off_t  length 
)

Definition at line 389 of file c-syscalls-posix.cpp.

◆ __posix_getcwd()

char* __posix_getcwd ( char *  buf,
size_t  size 
)

Definition at line 846 of file c-syscalls-posix.cpp.

◆ __posix_getpeername()

int __posix_getpeername ( int  socket,
struct sockaddr address,
socklen_t address_len 
)

Definition at line 620 of file c-syscalls-posix.cpp.

◆ __posix_getpid()

pid_t __posix_getpid ( void  )

Definition at line 877 of file c-syscalls-posix.cpp.

◆ __posix_getsockname()

int __posix_getsockname ( int  socket,
struct sockaddr address,
socklen_t address_len 
)

Definition at line 633 of file c-syscalls-posix.cpp.

◆ __posix_getsockopt()

int __posix_getsockopt ( int  socket,
int  level,
int  option_name,
void *  option_value,
socklen_t option_len 
)

Definition at line 646 of file c-syscalls-posix.cpp.

◆ __posix_gettimeofday()

int __posix_gettimeofday ( struct timeval *  ptimeval,
void *  ptimezone 
)

Definition at line 815 of file c-syscalls-posix.cpp.

◆ __posix_ioctl()

int __posix_ioctl ( int  fildes,
int  request,
  ... 
)

Definition at line 170 of file c-syscalls-posix.cpp.

◆ __posix_isatty()

int __posix_isatty ( int  fildes)

Test for a terminal device.

Parameters
[in]fildesNon-negative file descriptor.
Returns
This function shall return 1 if fildes is associated with a terminal; otherwise, it shall return 0 and may set errno to indicate the error.

This function shall test whether fildes, an open file descriptor, is associated with a terminal device.

Definition at line 221 of file c-syscalls-posix.cpp.

◆ __posix_kill()

int __posix_kill ( pid_t  pid,
int  sig 
)

Definition at line 884 of file c-syscalls-posix.cpp.

◆ __posix_link()

int __posix_link ( const char *  existing,
const char *  _new 
)

Definition at line 919 of file c-syscalls-posix.cpp.

◆ __posix_listen()

int __posix_listen ( int  socket,
int  backlog 
)

Definition at line 659 of file c-syscalls-posix.cpp.

◆ __posix_lseek()

off_t __posix_lseek ( int  fildes,
off_t  offset,
int  whence 
)

Definition at line 195 of file c-syscalls-posix.cpp.

◆ __posix_mkdir()

int __posix_mkdir ( const char *  path,
mode_t  mode 
)

Definition at line 477 of file c-syscalls-posix.cpp.

◆ __posix_open()

int __posix_open ( const char *  path,
int  oflag,
  ... 
)

Open file relative to directory file descriptor.

Parameters
[in]pathThe path argument points to a pathname naming the file.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list, defined in <fcntl.h>.
Returns
Upon successful completion, this function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor. Otherwise, this function shall return -1 and set errno to indicate the error. If -1 is returned, no files shall be created or modified.

The open() function shall establish the connection between a file and a file descriptor. It shall create an open file description that refers to a file and a file descriptor that refers to that open file description. The file descriptor is used by other I/O functions to refer to that file. The path argument points to a pathname naming the file.

Definition at line 90 of file c-syscalls-posix.cpp.

◆ __posix_opendir()

DIR* __posix_opendir ( const char *  dirname)

Definition at line 498 of file c-syscalls-posix.cpp.

◆ __posix_raise()

int __posix_raise ( int  sig)

Definition at line 891 of file c-syscalls-posix.cpp.

◆ __posix_read()

ssize_t __posix_read ( int  fildes,
void *  buf,
size_t  nbyte 
)

Definition at line 124 of file c-syscalls-posix.cpp.

◆ __posix_readdir()

struct dirent* __posix_readdir ( DIR dirp)

Definition at line 504 of file c-syscalls-posix.cpp.

◆ __posix_readdir_r()

int __posix_readdir_r ( DIR dirp,
struct dirent entry,
struct dirent **  result 
)

Definition at line 801 of file c-syscalls-posix.cpp.

◆ __posix_readlink()

ssize_t __posix_readlink ( const char *  path,
char *  buf,
size_t  bufsize 
)

Definition at line 933 of file c-syscalls-posix.cpp.

◆ __posix_recv()

ssize_t __posix_recv ( int  socket,
void *  buffer,
size_t  length,
int  flags 
)

Definition at line 671 of file c-syscalls-posix.cpp.

◆ __posix_recvfrom()

ssize_t __posix_recvfrom ( int  socket,
void *  buffer,
size_t  length,
int  flags,
struct sockaddr address,
socklen_t address_len 
)

Definition at line 683 of file c-syscalls-posix.cpp.

◆ __posix_recvmsg()

ssize_t __posix_recvmsg ( int  socket,
struct msghdr *  message,
int  flags 
)

Definition at line 696 of file c-syscalls-posix.cpp.

◆ __posix_rename()

int __posix_rename ( const char *  oldfn,
const char *  newfn 
)

Definition at line 450 of file c-syscalls-posix.cpp.

◆ __posix_rewinddir()

void __posix_rewinddir ( DIR dirp)

Definition at line 525 of file c-syscalls-posix.cpp.

◆ __posix_rmdir()

int __posix_rmdir ( const char *  path)

Definition at line 483 of file c-syscalls-posix.cpp.

◆ __posix_select()

int __posix_select ( int  nfds,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  errorfds,
struct timeval *  timeout 
)

Definition at line 824 of file c-syscalls-posix.cpp.

◆ __posix_send()

ssize_t __posix_send ( int  socket,
const void *  buffer,
size_t  length,
int  flags 
)

Definition at line 708 of file c-syscalls-posix.cpp.

◆ __posix_sendmsg()

ssize_t __posix_sendmsg ( int  socket,
const struct msghdr *  message,
int  flags 
)

Definition at line 720 of file c-syscalls-posix.cpp.

◆ __posix_sendto()

ssize_t __posix_sendto ( int  socket,
const void *  message,
size_t  length,
int  flags,
const struct sockaddr dest_addr,
socklen_t  dest_len 
)

Definition at line 732 of file c-syscalls-posix.cpp.

◆ __posix_setsockopt()

int __posix_setsockopt ( int  socket,
int  level,
int  option_name,
const void *  option_value,
socklen_t  option_len 
)

Definition at line 745 of file c-syscalls-posix.cpp.

◆ __posix_shutdown()

int __posix_shutdown ( int  socket,
int  how 
)

Definition at line 758 of file c-syscalls-posix.cpp.

◆ __posix_sockatmark()

int __posix_sockatmark ( int  socket)

Definition at line 770 of file c-syscalls-posix.cpp.

◆ __posix_socket()

int __posix_socket ( int  domain,
int  type,
int  protocol 
)

Definition at line 561 of file c-syscalls-posix.cpp.

◆ __posix_socketpair()

int __posix_socketpair ( int  domain,
int  type,
int  protocol,
int  socket_vector[2] 
)

Definition at line 808 of file c-syscalls-posix.cpp.

◆ __posix_stat()

int __posix_stat ( const char *  path,
struct stat buf 
)

Definition at line 438 of file c-syscalls-posix.cpp.

◆ __posix_statvfs()

int __posix_statvfs ( const char *  path,
struct statvfs buf 
)

Definition at line 468 of file c-syscalls-posix.cpp.

◆ __posix_symlink()

int __posix_symlink ( const char *  existing,
const char *  _new 
)

Definition at line 926 of file c-syscalls-posix.cpp.

◆ __posix_sync()

void __posix_sync ( void  )

Definition at line 489 of file c-syscalls-posix.cpp.

◆ __posix_system()

int __posix_system ( const char *  command)

Definition at line 898 of file c-syscalls-posix.cpp.

◆ __posix_tcdrain()

int __posix_tcdrain ( int  fildes)

Definition at line 237 of file c-syscalls-posix.cpp.

◆ __posix_tcflush()

int __posix_tcflush ( int  fildes,
int  queue_selector 
)

Definition at line 299 of file c-syscalls-posix.cpp.

◆ __posix_tcgetattr()

int __posix_tcgetattr ( int  fildes,
struct termios termios_p 
)

Definition at line 257 of file c-syscalls-posix.cpp.

◆ __posix_tcsendbreak()

int __posix_tcsendbreak ( int  fildes,
int  duration 
)

Definition at line 319 of file c-syscalls-posix.cpp.

◆ __posix_tcsetattr()

int __posix_tcsetattr ( int  fildes,
int  optional_actions,
const struct termios termios_p 
)

Definition at line 277 of file c-syscalls-posix.cpp.

◆ __posix_times()

clock_t __posix_times ( struct tms *  buf)

Definition at line 832 of file c-syscalls-posix.cpp.

◆ __posix_truncate()

int __posix_truncate ( const char *  path,
off_t  length 
)

Definition at line 444 of file c-syscalls-posix.cpp.

◆ __posix_unlink()

int __posix_unlink ( const char *  name)

Definition at line 456 of file c-syscalls-posix.cpp.

◆ __posix_utime()

int __posix_utime ( const char *  path,
const struct utimbuf *  times 
)

Definition at line 462 of file c-syscalls-posix.cpp.

◆ __posix_wait()

pid_t __posix_wait ( int *  stat_loc)

Definition at line 905 of file c-syscalls-posix.cpp.

◆ __posix_write()

ssize_t __posix_write ( int  fildes,
const void *  buf,
size_t  nbyte 
)

Definition at line 141 of file c-syscalls-posix.cpp.

◆ __posix_writev()

ssize_t __posix_writev ( int  fildes,
const struct iovec iov,
int  iovcnt 
)

Definition at line 158 of file c-syscalls-posix.cpp.

◆ os_startup_initialize_args()

void os_startup_initialize_args ( int *  p_argc,
char ***  p_argv 
)

Definition at line 413 of file startup.cpp.