$search
#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 gnulinux/fosi.h.
#define ORO_SCHED_OTHER SCHED_OTHER |
Definition at line 87 of file gnulinux/fosi.h.
#define ORO_SCHED_RT SCHED_FIFO |
Definition at line 86 of file gnulinux/fosi.h.
#define ORO_WAIT_ABS 0 |
Definition at line 66 of file gnulinux/fosi.h.
#define ORO_WAIT_REL 1 |
Definition at line 68 of file gnulinux/fosi.h.
#define rtos_printf printf |
Definition at line 314 of file gnulinux/fosi.h.
typedef long long NANO_TIME |
Definition at line 57 of file gnulinux/fosi.h.
typedef pthread_cond_t rt_cond_t |
Definition at line 286 of file gnulinux/fosi.h.
typedef pthread_mutex_t rt_mutex_t |
Definition at line 210 of file gnulinux/fosi.h.
typedef pthread_mutex_t rt_rec_mutex_t |
Definition at line 211 of file gnulinux/fosi.h.
typedef sem_t rt_sem_t |
Definition at line 145 of file gnulinux/fosi.h.
typedef long long TICK_TIME |
Definition at line 58 of file gnulinux/fosi.h.
typedef struct timespec TIME_SPEC |
Definition at line 59 of file 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 134 of file gnulinux/fosi.h.
static int rtos_cond_broadcast | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 309 of file gnulinux/fosi.h.
static int rtos_cond_destroy | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 293 of file gnulinux/fosi.h.
static int rtos_cond_init | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 288 of file 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 303 of file gnulinux/fosi.h.
static int rtos_cond_wait | ( | rt_cond_t * | cond, | |
rt_mutex_t * | mutex | |||
) | [inline, static] |
Definition at line 298 of file gnulinux/fosi.h.
static void rtos_disable_rt_warning | ( | ) | [inline, static] |
Definition at line 282 of file gnulinux/fosi.h.
static void rtos_enable_rt_warning | ( | ) | [inline, static] |
Definition at line 278 of file gnulinux/fosi.h.
static NANO_TIME rtos_get_time_ns | ( | void | ) | [inline, static] |
Definition at line 100 of file 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 117 of file gnulinux/fosi.h.
static int rtos_mutex_destroy | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 218 of file gnulinux/fosi.h.
static int rtos_mutex_init | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 213 of file gnulinux/fosi.h.
static int rtos_mutex_lock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 236 of file gnulinux/fosi.h.
static int rtos_mutex_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 246 of file gnulinux/fosi.h.
static int rtos_mutex_rec_destroy | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 231 of file gnulinux/fosi.h.
static int rtos_mutex_rec_init | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 223 of file gnulinux/fosi.h.
static int rtos_mutex_rec_lock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 241 of file gnulinux/fosi.h.
static int rtos_mutex_rec_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 252 of file gnulinux/fosi.h.
static int rtos_mutex_rec_trylock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 263 of file gnulinux/fosi.h.
static int rtos_mutex_rec_unlock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 273 of file gnulinux/fosi.h.
static int rtos_mutex_trylock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 258 of file gnulinux/fosi.h.
static int rtos_mutex_unlock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 268 of file gnulinux/fosi.h.
Definition at line 122 of file gnulinux/fosi.h.
static int rtos_sem_destroy | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 152 of file gnulinux/fosi.h.
static int rtos_sem_init | ( | rt_sem_t * | m, | |
int | value | |||
) | [inline, static] |
Definition at line 147 of file gnulinux/fosi.h.
static int rtos_sem_signal | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 157 of file gnulinux/fosi.h.
static int rtos_sem_trywait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 167 of file gnulinux/fosi.h.
static int rtos_sem_value | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 200 of file gnulinux/fosi.h.
static int rtos_sem_wait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 162 of file gnulinux/fosi.h.
Definition at line 172 of file gnulinux/fosi.h.
Definition at line 194 of file gnulinux/fosi.h.
static long long ticks2nano | ( | long long | count | ) | [inline, static] |
Definition at line 140 of file gnulinux/fosi.h.
Definition at line 92 of file gnulinux/fosi.h.
const NANO_TIME InfiniteNSecs = LLONG_MAX [static] |
Definition at line 63 of file gnulinux/fosi.h.
const double InfiniteSeconds = DBL_MAX [static] |
Definition at line 64 of file gnulinux/fosi.h.
const TICK_TIME InfiniteTicks = LLONG_MAX [static] |
Definition at line 62 of file gnulinux/fosi.h.