Classes | Defines | Typedefs | Functions | Variables
fosi.h File Reference
#include <stdio.h>
#include <pthread.h>
#include <mach/mach_init.h>
#include <mach/task.h>
#include <errno.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <mach/semaphore.h>
Include dependency graph for macosx/fosi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RTOS_TASK

Defines

#define CLOCK_REALTIME   0
#define HAVE_FOSI_API
#define ORO_SCHED_OTHER   SCHED_OTHER /** Posix normal scheduler */
#define ORO_SCHED_RT   SCHED_FIFO /** Posix FIFO scheduler */
#define ORO_WAIT_ABS
#define ORO_WAIT_REL
#define rtos_printf   printf

Typedefs

typedef long long NANO_TIME
typedef struct rt_mutex_impl_t rt_mutex_impl_t
typedef rt_mutex_impl_trt_mutex_t
typedef semaphore_t rt_sem_t
typedef long long TICK_TIME
typedef struct timespec TIME_SPEC

Functions

static int clock_gettime (int clk_id, struct timespec *tp)
static long long nano2ticks (long long nano)
static void rtos_disable_rt_warning ()
static void rtos_enable_rt_warning ()
static NANO_TIME rtos_get_time_ns (void)
static NANO_TIME rtos_get_time_ticks ()
int rtos_mutex_destroy (rt_mutex_t *m)
int rtos_mutex_init (rt_mutex_t *m)
int rtos_mutex_lock (rt_mutex_t *m)
int rtos_mutex_unlock (rt_mutex_t *m)
static 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_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)
static long long ticks2nano (long long count)
static TIME_SPEC ticks2timespec (TICK_TIME hrt)

Variables

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

Define Documentation

#define CLOCK_REALTIME   0

Definition at line 78 of file macosx/fosi.h.

#define HAVE_FOSI_API

Definition at line 22 of file macosx/fosi.h.

#define ORO_SCHED_OTHER   SCHED_OTHER /** Posix normal scheduler */

Definition at line 66 of file macosx/fosi.h.

#define ORO_SCHED_RT   SCHED_FIFO /** Posix FIFO scheduler */

Definition at line 65 of file macosx/fosi.h.

#define ORO_WAIT_ABS
Value:
0 

Definition at line 48 of file macosx/fosi.h.

#define ORO_WAIT_REL
Value:
1 

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

#define rtos_printf   printf

Definition at line 239 of file macosx/fosi.h.


Typedef Documentation

typedef long long NANO_TIME

Definition at line 41 of file macosx/fosi.h.

Definition at line 222 of file macosx/fosi.h.

Definition at line 224 of file macosx/fosi.h.

typedef semaphore_t rt_sem_t

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

typedef long long TICK_TIME

Definition at line 42 of file macosx/fosi.h.

typedef struct timespec TIME_SPEC

Definition at line 75 of file macosx/fosi.h.


Function Documentation

static int clock_gettime ( int  clk_id,
struct timespec *  tp 
) [inline, static]

Definition at line 79 of file macosx/fosi.h.

static long long nano2ticks ( long long  nano) [inline, static]

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

static void rtos_disable_rt_warning ( ) [inline, static]

Definition at line 234 of file macosx/fosi.h.

static void rtos_enable_rt_warning ( ) [inline, static]

Definition at line 230 of file macosx/fosi.h.

static NANO_TIME rtos_get_time_ns ( void  ) [inline, static]

Definition at line 102 of file macosx/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 118 of file macosx/fosi.h.

Definition at line 303 of file macosx/fosi_internal.cpp.

Definition at line 296 of file macosx/fosi_internal.cpp.

Definition at line 312 of file macosx/fosi_internal.cpp.

Definition at line 320 of file macosx/fosi_internal.cpp.

static int rtos_nanosleep ( const TIME_SPEC rqtp,
TIME_SPEC rmtp 
) [inline, static]

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

static int rtos_sem_destroy ( rt_sem_t m) [inline, static]

Definition at line 152 of file macosx/fosi.h.

static int rtos_sem_init ( rt_sem_t m,
int  value 
) [inline, static]

Definition at line 147 of file macosx/fosi.h.

static int rtos_sem_signal ( rt_sem_t m) [inline, static]

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

static int rtos_sem_trywait ( rt_sem_t m) [inline, static]

Definition at line 175 of file macosx/fosi.h.

static int rtos_sem_wait ( rt_sem_t m) [inline, static]

Definition at line 162 of file macosx/fosi.h.

static int rtos_sem_wait_timed ( rt_sem_t m,
NANO_TIME  delay 
) [inline, static]

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

static int rtos_sem_wait_until ( rt_sem_t m,
NANO_TIME  abs_time 
) [inline, static]
Todo:
avoid race condition where arg_time < now

Definition at line 180 of file macosx/fosi.h.

static long long ticks2nano ( long long  count) [inline, static]

Definition at line 134 of file macosx/fosi.h.

static TIME_SPEC ticks2timespec ( TICK_TIME  hrt) [inline, static]

Definition at line 94 of file macosx/fosi.h.


Variable Documentation

const NANO_TIME InfiniteNSecs = LLONG_MAX [static]

Definition at line 45 of file macosx/fosi.h.

const double InfiniteSeconds = DBL_MAX [static]

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

const TICK_TIME InfiniteTicks = LLONG_MAX [static]

Definition at line 44 of file macosx/fosi.h.



rtt
Author(s): RTT Developers
autogenerated on Mon Oct 6 2014 03:13:56