ISIX-RTOS - small operating system for ARM microcontrollers 1.2
Defines | Functions

fifo.c File Reference

#include <isix/config.h>
#include <isix/types.h>
#include <isix/memory.h>
#include <isix/semaphore.h>
#include <isix/fifo.h>
#include <prv/semaphore.h>
#include <prv/scheduler.h>
#include <string.h>
#include <prv/fifo.h>
#include <isix/printk.h>
Include dependency graph for fifo.c:

Go to the source code of this file.

Defines

#define ISIX_DEBUG_FIFO   ISIX_DBG_OFF

Functions

fifo_t * isix_fifo_create (int n_elem, int elem_size)
int isix_fifo_write (fifo_t *fifo, const void *item, tick_t timeout)
int isix_fifo_write_isr (fifo_t *fifo, const void *item)
int isix_fifo_read (fifo_t *fifo, void *item, tick_t timeout)
int isix_fifo_read_isr (fifo_t *fifo, void *item)
int isix_fifo_destroy (fifo_t *fifo)
int isix_fifo_count (fifo_t *fifo)

Define Documentation

#define ISIX_DEBUG_FIFO   ISIX_DBG_OFF

Definition at line 12 of file fifo.c.


Function Documentation

int isix_fifo_count ( fifo_t *  fifo)

Definition at line 174 of file fifo.c.

References isix::ISIX_EINVARG, and isix_sem_getval().

fifo_t* isix_fifo_create ( int  n_elem,
int  elem_size 
)

Create queue for n elements

Parameters:
[in]n_elemNumber of available elements in the fifo
[in]elem_sizeSize of the element
Returns:
Fifo object

Definition at line 28 of file fifo.c.

References IHANDLE_T_FIFO, isix_alloc(), isix_free(), isix_printk, isix::isix_sem_create(), and NULL.

int isix_fifo_destroy ( fifo_t *  fifo)
int isix_fifo_read ( fifo_t *  fifo,
void *  item,
tick_t  timeout 
)
int isix_fifo_read_isr ( fifo_t *  fifo,
void *  item 
)
int isix_fifo_write ( fifo_t *  fifo,
const void *  item,
tick_t  timeout 
)
int isix_fifo_write_isr ( fifo_t *  fifo,
const void *  item 
)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines