#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include "../oro_limits.h"
#include "../../rtt-config.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "dlfcn.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
Definition at line 28 of file rtt/os/win32/fosi.h.
#define ORO_SCHED_OTHER 1 |
Definition at line 100 of file rtt/os/win32/fosi.h.
#define ORO_SCHED_RT 0 |
Definition at line 99 of file rtt/os/win32/fosi.h.
#define ORO_WAIT_ABS 0 |
Definition at line 81 of file rtt/os/win32/fosi.h.
#define ORO_WAIT_REL 1 |
Definition at line 83 of file rtt/os/win32/fosi.h.
#define rtos_printf printf |
Definition at line 423 of file rtt/os/win32/fosi.h.
typedef long long NANO_TIME |
Definition at line 73 of file rtt/os/win32/fosi.h.
typedef CRITICAL_SECTION rt_mutex_t |
Definition at line 231 of file rtt/os/win32/fosi.h.
typedef CRITICAL_SECTION rt_rec_mutex_t |
Definition at line 232 of file rtt/os/win32/fosi.h.
typedef HANDLE rt_sem_t |
Definition at line 173 of file rtt/os/win32/fosi.h.
typedef long long TICK_TIME |
Definition at line 74 of file rtt/os/win32/fosi.h.
typedef struct oro_timespec TIME_SPEC |
Definition at line 108 of file rtt/os/win32/fosi.h.
long long nano2ticks | ( | long long | nano | ) | [inline] |
No conversions are needed in userspace. The HBGenerator needs this for accurate timekeeping, which is an anachronism in userspace.
Definition at line 160 of file rtt/os/win32/fosi.h.
static int rtos_cond_broadcast | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 399 of file rtt/os/win32/fosi.h.
static int rtos_cond_destroy | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 344 of file rtt/os/win32/fosi.h.
static int rtos_cond_init | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 323 of file rtt/os/win32/fosi.h.
static int rtos_cond_signal | ( | rt_cond_t * | cond | ) | [inline, static] |
Definition at line 411 of file rtt/os/win32/fosi.h.
static int rtos_cond_timedwait | ( | rt_cond_t * | cond, | |
rt_mutex_t * | mutex, | |||
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 389 of file rtt/os/win32/fosi.h.
static int rtos_cond_timedwait_internal | ( | rt_cond_t * | cond, | |
rt_mutex_t * | external_mutex, | |||
DWORD | ms | |||
) | [inline, static] |
Definition at line 354 of file rtt/os/win32/fosi.h.
static int rtos_cond_wait | ( | rt_cond_t * | cond, | |
rt_mutex_t * | mutex | |||
) | [inline, static] |
Definition at line 394 of file rtt/os/win32/fosi.h.
static void rtos_disable_rt_warning | ( | ) | [inline, static] |
Definition at line 305 of file rtt/os/win32/fosi.h.
static void rtos_enable_rt_warning | ( | ) | [inline, static] |
Definition at line 301 of file rtt/os/win32/fosi.h.
NANO_TIME rtos_get_time_ns | ( | void | ) | [inline] |
Get "system" time in nanoseconds
Definition at line 120 of file rtt/os/win32/fosi.h.
TICK_TIME rtos_get_time_ticks | ( | void | ) | [inline] |
This function should return ticks, but we use ticks == nsecs in userspace
Definition at line 134 of file rtt/os/win32/fosi.h.
static int rtos_mutex_destroy | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 240 of file rtt/os/win32/fosi.h.
static int rtos_mutex_init | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 234 of file rtt/os/win32/fosi.h.
static int rtos_mutex_lock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 256 of file rtt/os/win32/fosi.h.
static int rtos_mutex_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 279 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_destroy | ( | rt_rec_mutex_t * | m | ) | [inline, static] |
Definition at line 251 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_init | ( | rt_rec_mutex_t * | m | ) | [inline, static] |
Definition at line 246 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_lock | ( | rt_rec_mutex_t * | m | ) | [inline, static] |
Definition at line 291 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_lock_until | ( | rt_mutex_t * | m, | |
NANO_TIME | abs_time | |||
) | [inline, static] |
Definition at line 286 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_trylock | ( | rt_rec_mutex_t * | m | ) | [inline, static] |
Definition at line 274 of file rtt/os/win32/fosi.h.
static int rtos_mutex_rec_unlock | ( | rt_rec_mutex_t * | m | ) | [inline, static] |
Definition at line 296 of file rtt/os/win32/fosi.h.
static int rtos_mutex_trylock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 268 of file rtt/os/win32/fosi.h.
static int rtos_mutex_unlock | ( | rt_mutex_t * | m | ) | [inline, static] |
Definition at line 262 of file rtt/os/win32/fosi.h.
Definition at line 149 of file rtt/os/win32/fosi.h.
static int rtos_sem_destroy | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 181 of file rtt/os/win32/fosi.h.
static int rtos_sem_init | ( | rt_sem_t * | m, | |
int | value | |||
) | [inline, static] |
Definition at line 175 of file rtt/os/win32/fosi.h.
static int rtos_sem_signal | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 187 of file rtt/os/win32/fosi.h.
static int rtos_sem_trywait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 197 of file rtt/os/win32/fosi.h.
static int rtos_sem_value | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 214 of file rtt/os/win32/fosi.h.
static int rtos_sem_wait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 192 of file rtt/os/win32/fosi.h.
Definition at line 202 of file rtt/os/win32/fosi.h.
Definition at line 207 of file rtt/os/win32/fosi.h.
int setenv | ( | const char * | name, | |
const char * | value, | |||
int | overwrite | |||
) |
long long ticks2nano | ( | TICK_TIME | count | ) | [inline] |
Time conversions from system ticks to nano seconds.
Definition at line 166 of file rtt/os/win32/fosi.h.
Definition at line 112 of file rtt/os/win32/fosi.h.
int win32_nanosleep | ( | long long | nano | ) | [inline] |
Definition at line 139 of file rtt/os/win32/fosi.h.
const NANO_TIME InfiniteNSecs = LLONG_MAX |
Definition at line 78 of file rtt/os/win32/fosi.h.
const double InfiniteSeconds = DBL_MAX |
Definition at line 79 of file rtt/os/win32/fosi.h.
const TICK_TIME InfiniteTicks = LLONG_MAX |
Definition at line 77 of file rtt/os/win32/fosi.h.