RTEMS 6.3
Loading...
Searching...
No Matches

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)
#define LIBIO_NODELAY(_iop)
#define PIPE_EMPTY(_pipe)
#define PIPE_FULL(_pipe)
#define PIPE_SPACE(_pipe)
#define PIPE_WSTART(_pipe)
#define PIPE_LOCK(_pipe)
#define PIPE_UNLOCK(_pipe)
#define PIPE_READWAIT(_pipe)
#define PIPE_WRITEWAIT(_pipe)
#define PIPE_WAKEUPREADERS(_pipe)
#define PIPE_WAKEUPWRITERS(_pipe)

Functions

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

Detailed Description

FIFO/Pipe Support.

Macro Definition Documentation

◆ LIBIO_ACCMODE

#define LIBIO_ACCMODE ( _iop)
Value:
(rtems_libio_iop_flags(_iop) & LIBIO_FLAGS_READ_WRITE)

◆ LIBIO_NODELAY

#define LIBIO_NODELAY ( _iop)
Value:
rtems_libio_iop_is_no_delay(_iop)

◆ PIPE_EMPTY

#define PIPE_EMPTY ( _pipe)
Value:
(_pipe->Length == 0)

◆ PIPE_FULL

#define PIPE_FULL ( _pipe)
Value:
(_pipe->Length == _pipe->Size)

◆ PIPE_LOCK

#define PIPE_LOCK ( _pipe)
Value:
rtems_mutex_lock(&(_pipe)->Mutex)

◆ PIPE_READWAIT

#define PIPE_READWAIT ( _pipe)
Value:
rtems_condition_variable_wait(&(_pipe)->readBarrier, &(_pipe)->Mutex)

◆ PIPE_SPACE

#define PIPE_SPACE ( _pipe)
Value:
(_pipe->Size - _pipe->Length)

◆ PIPE_UNLOCK

#define PIPE_UNLOCK ( _pipe)
Value:
rtems_mutex_unlock(&(_pipe)->Mutex)

◆ PIPE_WAKEUPREADERS

#define PIPE_WAKEUPREADERS ( _pipe)
Value:
rtems_condition_variable_broadcast(&(_pipe)->readBarrier)

◆ PIPE_WAKEUPWRITERS

#define PIPE_WAKEUPWRITERS ( _pipe)
Value:
rtems_condition_variable_broadcast(&(_pipe)->writeBarrier)

◆ PIPE_WRITEWAIT

#define PIPE_WRITEWAIT ( _pipe)
Value:
rtems_condition_variable_wait(&(_pipe)->writeBarrier, &(_pipe)->Mutex)

◆ PIPE_WSTART

#define PIPE_WSTART ( _pipe)
Value:
((_pipe->Start + _pipe->Length) % _pipe->Size)