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 _DARWIN_C_SOURCE
#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

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

#define CLOCK_REALTIME   0

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

#define HAVE_FOSI_API

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

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

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

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

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

#define ORO_WAIT_ABS
Value:
0 

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

#define ORO_WAIT_REL
Value:
1 

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

#define rtos_printf   printf

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


Typedef Documentation

typedef long long NANO_TIME

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

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

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

typedef semaphore_t rt_sem_t

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

typedef long long TICK_TIME

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

typedef struct timespec TIME_SPEC

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


Function Documentation

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

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

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

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

static void rtos_disable_rt_warning ( ) [inline, static]

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

static void rtos_enable_rt_warning ( ) [inline, static]

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

static NANO_TIME rtos_get_time_ns ( void  ) [inline, static]

Definition at line 100 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 116 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 121 of file macosx/fosi.h.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Variable Documentation

const NANO_TIME InfiniteNSecs = LLONG_MAX [static]

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

const double InfiniteSeconds = DBL_MAX [static]

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

const TICK_TIME InfiniteTicks = LLONG_MAX [static]

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



rtt
Author(s): RTT Developers
autogenerated on Thu Jan 2 2014 11:35:41