RTEMS  5.1
Macros | Functions

FIFO/Pipe Support. More...

#include <sys/param.h>
#include <sys/filio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <rtems.h>
#include <rtems/libio_.h>
#include <rtems/pipe.h>

Macros

#define LIBIO_ACCMODE(_iop)   (rtems_libio_iop_flags(_iop) & LIBIO_FLAGS_READ_WRITE)
 
#define LIBIO_NODELAY(_iop)   rtems_libio_iop_is_no_delay(_iop)
 
#define PIPE_EMPTY(_pipe)   (_pipe->Length == 0)
 
#define PIPE_FULL(_pipe)   (_pipe->Length == _pipe->Size)
 
#define PIPE_SPACE(_pipe)   (_pipe->Size - _pipe->Length)
 
#define PIPE_WSTART(_pipe)   ((_pipe->Start + _pipe->Length) % _pipe->Size)
 
#define PIPE_LOCK(_pipe)   rtems_mutex_lock(&(_pipe)->Mutex)
 
#define PIPE_UNLOCK(_pipe)   rtems_mutex_unlock(&(_pipe)->Mutex)
 
#define PIPE_READWAIT(_pipe)   rtems_condition_variable_wait(&(_pipe)->readBarrier, &(_pipe)->Mutex)
 
#define PIPE_WRITEWAIT(_pipe)   rtems_condition_variable_wait(&(_pipe)->writeBarrier, &(_pipe)->Mutex)
 
#define PIPE_WAKEUPREADERS(_pipe)   rtems_condition_variable_broadcast(&(_pipe)->readBarrier)
 
#define PIPE_WAKEUPWRITERS(_pipe)   rtems_condition_variable_broadcast(&(_pipe)->writeBarrier)
 

Functions

void pipe_release (pipe_control_t **pipep, rtems_libio_t *iop)
 Release a pipe. More...
 
int fifo_open (pipe_control_t **pipep, rtems_libio_t *iop)
 File system open. Interface to file system open. More...
 
ssize_t pipe_read (pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop)
 File system read. More...
 
ssize_t pipe_write (pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop)
 File system write. More...
 
int pipe_ioctl (pipe_control_t *pipe, ioctl_command_t cmd, void *buffer, rtems_libio_t *iop)
 File system Input/Output control. More...
 

Detailed Description

FIFO/Pipe Support.