Classes | Macros | Typedefs | Functions | Variables
lxrt/fosi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sched.h>
#include <assert.h>
#include <limits.h>
#include <float.h>
#include "../oro_limits.h"
#include "../../rtt-config.h"
#include <rtai_config.h>
#include <rtai_lxrt.h>
#include <rtai_sem.h>
Include dependency graph for lxrt/fosi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oro_rtai_cond_t
 
struct  oro_rtai_sem_t
 
struct  RTOS_TASK
 

Macros

#define __LXRT_USERSPACE__
 
#define _GNU_SOURCE
 
#define _XOPEN_SOURCE   600
 
#define CHK_LXRT_CALL()
 
#define CHK_LXRT_PTR(a)
 
#define HAVE_FOSI_API
 
#define ORO_SCHED_OTHER   1 /** LXRT Soft real-time */
 
#define ORO_SCHED_RT   0 /** LXRT Hard real-time */
 
#define ORO_WAIT_ABS   0 /** Not supported for the lxrt target */
 
#define ORO_WAIT_REL   1 /** Not supported for the lxrt target */
 
#define SCHED_LXRT_HARD   0 /** LXRT Hard real-time */
 
#define SCHED_LXRT_SOFT   1 /** LXRT Soft real-time */
 

Typedefs

typedef long long NANO_TIME
 
typedef struct oro_rtai_cond_t rt_cond_t
 
typedef rt_sem_t rt_mutex_t
 
typedef rt_sem_t rt_rec_mutex_t
 
typedef struct oro_rtai_sem_t rt_sem_t
 
typedef CND RTOS_RTAI_CND
 
typedef SEM RTOS_RTAI_SEM
 
typedef RT_TASK RTOS_RTAI_TASK
 
typedef long long TICK_TIME
 
typedef struct timespec TIME_SPEC
 

Functions

TICK_TIME nano2ticks (NANO_TIME t)
 
static int rtos_cond_broadcast (rt_cond_t *cond)
 
static int rtos_cond_destroy (rt_cond_t *cond)
 
static int rtos_cond_init (rt_cond_t *cond)
 
static int rtos_cond_timedwait (rt_cond_t *cond, rt_mutex_t *mutex, NANO_TIME abstime)
 
static int rtos_cond_wait (rt_cond_t *cond, rt_mutex_t *mutex)
 
static void rtos_disable_rt_warning ()
 
static void rtos_enable_rt_warning ()
 
NANO_TIME rtos_get_time_ns (void)
 
TICK_TIME rtos_get_time_ticks (void)
 
static int rtos_mutex_destroy (rt_mutex_t *m)
 
static int rtos_mutex_init (rt_mutex_t *m)
 
static int rtos_mutex_lock (rt_mutex_t *m)
 
static int rtos_mutex_lock_until (rt_mutex_t *m, NANO_TIME abs_time)
 
static int rtos_mutex_rec_destroy (rt_rec_mutex_t *m)
 
static int rtos_mutex_rec_init (rt_rec_mutex_t *m)
 
static int rtos_mutex_rec_lock (rt_rec_mutex_t *m)
 
static int rtos_mutex_rec_lock_until (rt_rec_mutex_t *m, NANO_TIME abs_time)
 
static int rtos_mutex_rec_trylock (rt_rec_mutex_t *m)
 
static int rtos_mutex_rec_unlock (rt_rec_mutex_t *m)
 
static int rtos_mutex_trylock (rt_mutex_t *m)
 
static int rtos_mutex_unlock (rt_mutex_t *m)
 
int rtos_nanosleep (const TIME_SPEC *rqtp, TIME_SPEC *rmtp)
 
int rtos_printf (const char *fmt,...)
 
static int rtos_sem_destroy (rt_sem_t *m)
 
static int rtos_sem_init (rt_sem_t *m, int value)
 
static int rtos_sem_signal (rt_sem_t *m)
 
static int rtos_sem_trywait (rt_sem_t *m)
 
static int rtos_sem_value (rt_sem_t *m)
 
static int rtos_sem_wait (rt_sem_t *m)
 
static int rtos_sem_wait_timed (rt_sem_t *m, NANO_TIME delay)
 
static int rtos_sem_wait_until (rt_sem_t *m, NANO_TIME when)
 
NANO_TIME ticks2nano (TICK_TIME t)
 
TIME_SPEC ticks2timespec (TICK_TIME hrt)
 
TICK_TIME ticksPerSec (void)
 

Variables

static const NANO_TIME InfiniteNSecs = LLONG_MAX
 
static const double InfiniteSeconds = DBL_MAX
 
static const TICK_TIME InfiniteTicks = LLONG_MAX
 

Macro Definition Documentation

#define __LXRT_USERSPACE__

Definition at line 119 of file lxrt/fosi.h.

#define _GNU_SOURCE

This file translates the FOSI (Framework Operating System Interface) from orocos calls to native RTOS calls

Definition at line 49 of file lxrt/fosi.h.

#define _XOPEN_SOURCE   600

Definition at line 54 of file lxrt/fosi.h.

#define CHK_LXRT_CALL ( )

Definition at line 186 of file lxrt/fosi.h.

#define CHK_LXRT_PTR (   a)

Definition at line 187 of file lxrt/fosi.h.

#define HAVE_FOSI_API

Definition at line 57 of file lxrt/fosi.h.

#define ORO_SCHED_OTHER   1 /** LXRT Soft real-time */

Definition at line 146 of file lxrt/fosi.h.

#define ORO_SCHED_RT   0 /** LXRT Hard real-time */

Definition at line 145 of file lxrt/fosi.h.

#define ORO_WAIT_ABS   0 /** Not supported for the lxrt target */

Definition at line 148 of file lxrt/fosi.h.

#define ORO_WAIT_REL   1 /** Not supported for the lxrt target */

Definition at line 149 of file lxrt/fosi.h.

#define SCHED_LXRT_HARD   0 /** LXRT Hard real-time */

Definition at line 143 of file lxrt/fosi.h.

#define SCHED_LXRT_SOFT   1 /** LXRT Soft real-time */

Definition at line 144 of file lxrt/fosi.h.

Typedef Documentation

typedef long long NANO_TIME

Definition at line 127 of file lxrt/fosi.h.

typedef struct oro_rtai_cond_t rt_cond_t

Definition at line 122 of file lxrt/fosi.h.

Definition at line 123 of file lxrt/fosi.h.

typedef struct oro_rtai_sem_t rt_sem_t
typedef CND RTOS_RTAI_CND

Definition at line 90 of file lxrt/fosi.h.

typedef SEM RTOS_RTAI_SEM

Definition at line 89 of file lxrt/fosi.h.

typedef RT_TASK RTOS_RTAI_TASK

Definition at line 88 of file lxrt/fosi.h.

typedef long long TICK_TIME

Definition at line 128 of file lxrt/fosi.h.

typedef struct timespec TIME_SPEC

Definition at line 129 of file lxrt/fosi.h.

Function Documentation

TICK_TIME nano2ticks ( NANO_TIME  nano)
inline

Time conversions from nano seconds to system ticks.

Definition at line 196 of file lxrt/fosi.h.

static int rtos_cond_broadcast ( rt_cond_t cond)
inlinestatic

Definition at line 385 of file lxrt/fosi.h.

static int rtos_cond_destroy ( rt_cond_t cond)
inlinestatic

Definition at line 359 of file lxrt/fosi.h.

static int rtos_cond_init ( rt_cond_t cond)
inlinestatic

Definition at line 352 of file lxrt/fosi.h.

static int rtos_cond_timedwait ( rt_cond_t cond,
rt_mutex_t mutex,
NANO_TIME  abstime 
)
inlinestatic

Definition at line 374 of file lxrt/fosi.h.

static int rtos_cond_wait ( rt_cond_t cond,
rt_mutex_t mutex 
)
inlinestatic

Definition at line 365 of file lxrt/fosi.h.

static void rtos_disable_rt_warning ( void  )
inlinestatic

Definition at line 471 of file lxrt/fosi.h.

static void rtos_enable_rt_warning ( void  )
inlinestatic

Definition at line 467 of file lxrt/fosi.h.

NANO_TIME rtos_get_time_ns ( void  )
inline

Get "system" time in nanoseconds

Definition at line 190 of file lxrt/fosi.h.

TICK_TIME rtos_get_time_ticks ( void  )
inline

Get "system" time in ticks FIXME see https://proj.fmtc.be/orocos-bugzilla/show_bug.cgi?id=60

Definition at line 192 of file lxrt/fosi.h.

static int rtos_mutex_destroy ( rt_mutex_t m)
inlinestatic

Definition at line 283 of file lxrt/fosi.h.

static int rtos_mutex_init ( rt_mutex_t m)
inlinestatic

Definition at line 276 of file lxrt/fosi.h.

static int rtos_mutex_lock ( rt_mutex_t m)
inlinestatic

Definition at line 303 of file lxrt/fosi.h.

static int rtos_mutex_lock_until ( rt_mutex_t m,
NANO_TIME  abs_time 
)
inlinestatic

Definition at line 327 of file lxrt/fosi.h.

static int rtos_mutex_rec_destroy ( rt_rec_mutex_t m)
inlinestatic

Definition at line 297 of file lxrt/fosi.h.

static int rtos_mutex_rec_init ( rt_rec_mutex_t m)
inlinestatic

Definition at line 289 of file lxrt/fosi.h.

static int rtos_mutex_rec_lock ( rt_rec_mutex_t m)
inlinestatic

Definition at line 309 of file lxrt/fosi.h.

static int rtos_mutex_rec_lock_until ( rt_rec_mutex_t m,
NANO_TIME  abs_time 
)
inlinestatic

Definition at line 333 of file lxrt/fosi.h.

static int rtos_mutex_rec_trylock ( rt_rec_mutex_t m)
inlinestatic

Definition at line 321 of file lxrt/fosi.h.

static int rtos_mutex_rec_unlock ( rt_rec_mutex_t m)
inlinestatic

Definition at line 346 of file lxrt/fosi.h.

static int rtos_mutex_trylock ( rt_mutex_t m)
inlinestatic

Definition at line 315 of file lxrt/fosi.h.

static int rtos_mutex_unlock ( rt_mutex_t m)
inlinestatic

Definition at line 340 of file lxrt/fosi.h.

int rtos_nanosleep ( const TIME_SPEC rqtp,
TIME_SPEC rmtp 
)
inline

Definition at line 199 of file lxrt/fosi.h.

int rtos_printf ( const char *  fmt,
  ... 
)
inline

'real-time' print function.

Definition at line 391 of file lxrt/fosi.h.

static int rtos_sem_destroy ( rt_sem_t m)
inlinestatic

Definition at line 214 of file lxrt/fosi.h.

static int rtos_sem_init ( rt_sem_t m,
int  value 
)
inlinestatic

Definition at line 206 of file lxrt/fosi.h.

static int rtos_sem_signal ( rt_sem_t m)
inlinestatic

Definition at line 220 of file lxrt/fosi.h.

static int rtos_sem_trywait ( rt_sem_t m)
inlinestatic

Definition at line 232 of file lxrt/fosi.h.

static int rtos_sem_value ( rt_sem_t m)
inlinestatic

Definition at line 238 of file lxrt/fosi.h.

static int rtos_sem_wait ( rt_sem_t m)
inlinestatic

Definition at line 226 of file lxrt/fosi.h.

static int rtos_sem_wait_timed ( rt_sem_t m,
NANO_TIME  delay 
)
inlinestatic

Definition at line 244 of file lxrt/fosi.h.

static int rtos_sem_wait_until ( rt_sem_t m,
NANO_TIME  when 
)
inlinestatic

Definition at line 260 of file lxrt/fosi.h.

NANO_TIME ticks2nano ( TICK_TIME  count)
inline

Time conversions from system ticks to nano seconds.

Definition at line 197 of file lxrt/fosi.h.

TIME_SPEC ticks2timespec ( TICK_TIME  hrt)
inline

Definition at line 165 of file lxrt/fosi.h.

TICK_TIME ticksPerSec ( void  )
inline

Definition at line 194 of file lxrt/fosi.h.

Variable Documentation

const NANO_TIME InfiniteNSecs = LLONG_MAX
static

Definition at line 140 of file lxrt/fosi.h.

const double InfiniteSeconds = DBL_MAX
static

Definition at line 141 of file lxrt/fosi.h.

const TICK_TIME InfiniteTicks = LLONG_MAX
static

Definition at line 139 of file lxrt/fosi.h.



rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:45