#include <stdio.h>
#include <semaphore.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include "../oro_limits.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
Go to the source code of this file.
#define HAVE_FOSI_API |
This file translates the FOSI (Framework Operating System Interface) from orocos calls to native RTOS calls
TODO : split in multiple files
Definition at line 30 of file install/include/rtt/os/gnulinux/fosi.h.
#define ORO_SCHED_OTHER SCHED_OTHER |
Definition at line 86 of file install/include/rtt/os/gnulinux/fosi.h.
#define ORO_SCHED_RT SCHED_FIFO |
Definition at line 85 of file install/include/rtt/os/gnulinux/fosi.h.
#define ORO_WAIT_ABS 0 |
Definition at line 66 of file install/include/rtt/os/gnulinux/fosi.h.
#define ORO_WAIT_REL 1 |
Definition at line 68 of file install/include/rtt/os/gnulinux/fosi.h.
#define rtos_printf printf |
Definition at line 313 of file install/include/rtt/os/gnulinux/fosi.h.
typedef long long NANO_TIME |
Definition at line 57 of file install/include/rtt/os/gnulinux/fosi.h.
typedef pthread_cond_t rt_cond_t |
Definition at line 285 of file install/include/rtt/os/gnulinux/fosi.h.
typedef pthread_mutex_t rt_mutex_t |
Definition at line 209 of file install/include/rtt/os/gnulinux/fosi.h.
typedef pthread_mutex_t rt_rec_mutex_t |
Definition at line 210 of file install/include/rtt/os/gnulinux/fosi.h.
typedef sem_t rt_sem_t |
Definition at line 144 of file install/include/rtt/os/gnulinux/fosi.h.
typedef long long TICK_TIME |
Definition at line 58 of file install/include/rtt/os/gnulinux/fosi.h.
typedef struct timespec TIME_SPEC |
Definition at line 59 of file install/include/rtt/os/gnulinux/fosi.h.
static long long nano2ticks | ( | long long | nano | ) | [inline, static] |
No conversions are needed in userspace. The HBGenerator needs this for accurate timekeeping, which is an anachronism in userspace.
Definition at line 133 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_cond_broadcast | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 308 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_cond_destroy | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 292 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_cond_init | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 287 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_cond_timedwait | ( | rt_cond_t * | cond, | |
rt_mutex_t * | mutex, | |||
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 302 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_cond_wait | ( | rt_cond_t * | cond, | |
rt_mutex_t * | mutex | |||
) | [inline, static] |
Definition at line 297 of file install/include/rtt/os/gnulinux/fosi.h.
static void rtos_disable_rt_warning | ( | ) | [inline, static] |
Definition at line 281 of file install/include/rtt/os/gnulinux/fosi.h.
static void rtos_enable_rt_warning | ( | ) | [inline, static] |
Definition at line 277 of file install/include/rtt/os/gnulinux/fosi.h.
static NANO_TIME rtos_get_time_ns | ( | void | ) | [inline, static] |
Definition at line 99 of file install/include/rtt/os/gnulinux/fosi.h.
static NANO_TIME rtos_get_time_ticks | ( | void | ) | [inline, static] |
This function should return ticks, but we use ticks == nsecs in userspace
Definition at line 116 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_destroy | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 217 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_init | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 212 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_lock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 235 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 245 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_destroy | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 230 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_init | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 222 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_lock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 240 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 251 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_trylock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 262 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_rec_unlock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 272 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_trylock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 257 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_mutex_unlock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 267 of file install/include/rtt/os/gnulinux/fosi.h.
Definition at line 121 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_destroy | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 151 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_init | ( | rt_sem_t * | m, | |
int | value | |||
) | [inline, static] |
Definition at line 146 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_signal | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 156 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_trywait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 166 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_value | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 199 of file install/include/rtt/os/gnulinux/fosi.h.
static int rtos_sem_wait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 161 of file install/include/rtt/os/gnulinux/fosi.h.
Definition at line 171 of file install/include/rtt/os/gnulinux/fosi.h.
Definition at line 193 of file install/include/rtt/os/gnulinux/fosi.h.
static long long ticks2nano | ( | long long | count | ) | [inline, static] |
Definition at line 139 of file install/include/rtt/os/gnulinux/fosi.h.
Definition at line 91 of file install/include/rtt/os/gnulinux/fosi.h.
const NANO_TIME InfiniteNSecs = LLONG_MAX [static] |
Definition at line 63 of file install/include/rtt/os/gnulinux/fosi.h.
const double InfiniteSeconds = DBL_MAX [static] |
Definition at line 64 of file install/include/rtt/os/gnulinux/fosi.h.
const TICK_TIME InfiniteTicks = LLONG_MAX [static] |
Definition at line 62 of file install/include/rtt/os/gnulinux/fosi.h.