Classes | Macros | Typedefs | Functions | Variables
win32/fosi.h File Reference
#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"
Include dependency graph for win32/fosi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oro_timespec
 
struct  rt_cond_t
 
struct  RTOS_TASK
 

Macros

#define HAVE_FOSI_API
 
#define ORO_SCHED_OTHER   1 /** Linux normal scheduler */
 
#define ORO_SCHED_RT   0 /** Linux FIFO scheduler */
 
#define ORO_WAIT_ABS
 
#define ORO_WAIT_REL
 
#define rtos_printf   printf
 

Typedefs

typedef long long NANO_TIME
 
typedef CRITICAL_SECTION rt_mutex_t
 
typedef CRITICAL_SECTION rt_rec_mutex_t
 
typedef HANDLE rt_sem_t
 
typedef long long TICK_TIME
 
typedef struct oro_timespec TIME_SPEC
 

Functions

long long nano2ticks (long long nano)
 
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_signal (rt_cond_t *cond)
 
static int rtos_cond_timedwait (rt_cond_t *cond, rt_mutex_t *mutex, NANO_TIME abs_time)
 
static int rtos_cond_timedwait_internal (rt_cond_t *cond, rt_mutex_t *external_mutex, DWORD ms)
 
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 ()
 
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_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)
 
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 abs_time)
 
int setenv (const char *name, const char *value, int overwrite)
 
RTT_API unsigned int sleep (unsigned int seconds)
 
long long ticks2nano (long long count)
 
TIME_SPEC ticks2timespec (TICK_TIME hrt)
 
RTT_API int usleep (unsigned int us)
 
int win32_nanosleep (long long nano)
 

Variables

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

Macro Definition Documentation

#define HAVE_FOSI_API

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

Definition at line 46 of file win32/fosi.h.

#define ORO_SCHED_OTHER   1 /** Linux normal scheduler */

Definition at line 118 of file win32/fosi.h.

#define ORO_SCHED_RT   0 /** Linux FIFO scheduler */

Definition at line 117 of file win32/fosi.h.

#define ORO_WAIT_ABS
Value:
0

Definition at line 99 of file win32/fosi.h.

#define ORO_WAIT_REL
Value:
1

Definition at line 101 of file win32/fosi.h.

#define rtos_printf   printf

Definition at line 441 of file win32/fosi.h.

Typedef Documentation

typedef long long NANO_TIME

Definition at line 91 of file win32/fosi.h.

typedef CRITICAL_SECTION rt_mutex_t

Definition at line 249 of file win32/fosi.h.

typedef CRITICAL_SECTION rt_rec_mutex_t

Definition at line 250 of file win32/fosi.h.

typedef HANDLE rt_sem_t

Definition at line 191 of file win32/fosi.h.

typedef long long TICK_TIME

Definition at line 92 of file win32/fosi.h.

typedef struct oro_timespec TIME_SPEC

Definition at line 126 of file win32/fosi.h.

Function Documentation

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 178 of file win32/fosi.h.

static int rtos_cond_broadcast ( rt_cond_t cond)
inlinestatic

Definition at line 417 of file win32/fosi.h.

static int rtos_cond_destroy ( rt_cond_t cond)
inlinestatic

Definition at line 362 of file win32/fosi.h.

static int rtos_cond_init ( rt_cond_t cond)
inlinestatic

Definition at line 341 of file win32/fosi.h.

static int rtos_cond_signal ( rt_cond_t cond)
inlinestatic

Definition at line 429 of file win32/fosi.h.

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

Definition at line 407 of file win32/fosi.h.

static int rtos_cond_timedwait_internal ( rt_cond_t cond,
rt_mutex_t external_mutex,
DWORD  ms 
)
inlinestatic

Definition at line 372 of file win32/fosi.h.

static int rtos_cond_wait ( rt_cond_t cond,
rt_mutex_t mutex 
)
inlinestatic

Definition at line 412 of file win32/fosi.h.

static void rtos_disable_rt_warning ( void  )
inlinestatic

Definition at line 323 of file win32/fosi.h.

static void rtos_enable_rt_warning ( void  )
inlinestatic

Definition at line 319 of file win32/fosi.h.

NANO_TIME rtos_get_time_ns ( void  )
inline

Get "system" time in nanoseconds

Definition at line 138 of file 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 152 of file win32/fosi.h.

static int rtos_mutex_destroy ( rt_mutex_t m)
inlinestatic

Definition at line 258 of file win32/fosi.h.

static int rtos_mutex_init ( rt_mutex_t m)
inlinestatic

Definition at line 252 of file win32/fosi.h.

static int rtos_mutex_lock ( rt_mutex_t m)
inlinestatic

Definition at line 274 of file win32/fosi.h.

static int rtos_mutex_lock_until ( rt_mutex_t m,
NANO_TIME  abs_time 
)
inlinestatic

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

static int rtos_mutex_rec_destroy ( rt_rec_mutex_t m)
inlinestatic

Definition at line 269 of file win32/fosi.h.

static int rtos_mutex_rec_init ( rt_rec_mutex_t m)
inlinestatic

Definition at line 264 of file win32/fosi.h.

static int rtos_mutex_rec_lock ( rt_rec_mutex_t m)
inlinestatic

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

static int rtos_mutex_rec_lock_until ( rt_mutex_t m,
NANO_TIME  abs_time 
)
inlinestatic

Definition at line 304 of file win32/fosi.h.

static int rtos_mutex_rec_trylock ( rt_rec_mutex_t m)
inlinestatic

Definition at line 292 of file win32/fosi.h.

static int rtos_mutex_rec_unlock ( rt_rec_mutex_t m)
inlinestatic

Definition at line 314 of file win32/fosi.h.

static int rtos_mutex_trylock ( rt_mutex_t m)
inlinestatic

Definition at line 286 of file win32/fosi.h.

static int rtos_mutex_unlock ( rt_mutex_t m)
inlinestatic

Definition at line 280 of file win32/fosi.h.

int rtos_nanosleep ( const TIME_SPEC rqtp,
TIME_SPEC rmtp 
)
inline

Definition at line 167 of file win32/fosi.h.

static int rtos_sem_destroy ( rt_sem_t m)
inlinestatic

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

static int rtos_sem_init ( rt_sem_t m,
int  value 
)
inlinestatic

Definition at line 193 of file win32/fosi.h.

static int rtos_sem_signal ( rt_sem_t m)
inlinestatic

Definition at line 205 of file win32/fosi.h.

static int rtos_sem_trywait ( rt_sem_t m)
inlinestatic

Definition at line 215 of file win32/fosi.h.

static int rtos_sem_value ( rt_sem_t m)
inlinestatic

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

static int rtos_sem_wait ( rt_sem_t m)
inlinestatic

Definition at line 210 of file win32/fosi.h.

static int rtos_sem_wait_timed ( rt_sem_t m,
NANO_TIME  delay 
)
inlinestatic

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

static int rtos_sem_wait_until ( rt_sem_t m,
NANO_TIME  abs_time 
)
inlinestatic

Definition at line 225 of file win32/fosi.h.

int setenv ( const char *  name,
const char *  value,
int  overwrite 
)

Definition at line 64 of file fosi.cpp.

RTT_API unsigned int sleep ( unsigned int  seconds)

Definition at line 51 of file fosi.cpp.

long long ticks2nano ( long long  count)
inline

Definition at line 184 of file win32/fosi.h.

TIME_SPEC ticks2timespec ( TICK_TIME  hrt)
inline

Definition at line 130 of file win32/fosi.h.

RTT_API int usleep ( unsigned int  us)

Definition at line 58 of file fosi.cpp.

int win32_nanosleep ( long long  nano)
inline

Definition at line 157 of file win32/fosi.h.

Variable Documentation

const NANO_TIME InfiniteNSecs = LLONG_MAX

Definition at line 96 of file win32/fosi.h.

const double InfiniteSeconds = DBL_MAX

Definition at line 97 of file win32/fosi.h.

const TICK_TIME InfiniteTicks = LLONG_MAX

Definition at line 95 of file win32/fosi.h.



rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:38