#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>
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 |
#define | ORO_SCHED_RT SCHED_FIFO |
#define | ORO_WAIT_ABS 0 |
#define | ORO_WAIT_REL 1 |
#define | rtos_printf printf |
Typedefs | |
typedef long long | NANO_TIME |
typedef struct rt_mutex_impl_t | rt_mutex_impl_t |
typedef rt_mutex_impl_t * | rt_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 CLOCK_REALTIME 0 |
Definition at line 80 of file rtt/os/macosx/fosi.h.
#define HAVE_FOSI_API |
Definition at line 22 of file rtt/os/macosx/fosi.h.
#define ORO_SCHED_OTHER SCHED_OTHER |
Definition at line 68 of file rtt/os/macosx/fosi.h.
#define ORO_SCHED_RT SCHED_FIFO |
Definition at line 67 of file rtt/os/macosx/fosi.h.
#define ORO_WAIT_ABS 0 |
Definition at line 48 of file rtt/os/macosx/fosi.h.
#define ORO_WAIT_REL 1 |
Definition at line 50 of file rtt/os/macosx/fosi.h.
#define rtos_printf printf |
Definition at line 241 of file rtt/os/macosx/fosi.h.
typedef long long NANO_TIME |
Definition at line 41 of file rtt/os/macosx/fosi.h.
typedef struct rt_mutex_impl_t rt_mutex_impl_t |
Definition at line 224 of file rtt/os/macosx/fosi.h.
typedef rt_mutex_impl_t* rt_mutex_t |
Definition at line 226 of file rtt/os/macosx/fosi.h.
typedef semaphore_t rt_sem_t |
Definition at line 147 of file rtt/os/macosx/fosi.h.
typedef long long TICK_TIME |
Definition at line 42 of file rtt/os/macosx/fosi.h.
typedef struct timespec TIME_SPEC |
Definition at line 77 of file rtt/os/macosx/fosi.h.
static int clock_gettime | ( | int | clk_id, | |
struct timespec * | tp | |||
) | [inline, static] |
Definition at line 81 of file rtt/os/macosx/fosi.h.
static long long nano2ticks | ( | long long | nano | ) | [inline, static] |
Definition at line 131 of file rtt/os/macosx/fosi.h.
static void rtos_disable_rt_warning | ( | ) | [inline, static] |
Definition at line 236 of file rtt/os/macosx/fosi.h.
static void rtos_enable_rt_warning | ( | ) | [inline, static] |
Definition at line 232 of file rtt/os/macosx/fosi.h.
static NANO_TIME rtos_get_time_ns | ( | void | ) | [inline, static] |
Definition at line 104 of file rtt/os/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 120 of file rtt/os/macosx/fosi.h.
int rtos_mutex_destroy | ( | rt_mutex_t * | m | ) |
Definition at line 298 of file macosx/fosi_internal.cpp.
int rtos_mutex_init | ( | rt_mutex_t * | m | ) |
Definition at line 291 of file macosx/fosi_internal.cpp.
int rtos_mutex_lock | ( | rt_mutex_t * | m | ) |
Definition at line 307 of file macosx/fosi_internal.cpp.
int rtos_mutex_unlock | ( | rt_mutex_t * | m | ) |
Definition at line 315 of file macosx/fosi_internal.cpp.
Definition at line 125 of file rtt/os/macosx/fosi.h.
static int rtos_sem_destroy | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 154 of file rtt/os/macosx/fosi.h.
static int rtos_sem_init | ( | rt_sem_t * | m, | |
int | value | |||
) | [inline, static] |
Definition at line 149 of file rtt/os/macosx/fosi.h.
static int rtos_sem_signal | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 159 of file rtt/os/macosx/fosi.h.
static int rtos_sem_trywait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 177 of file rtt/os/macosx/fosi.h.
static int rtos_sem_wait | ( | rt_sem_t * | m | ) | [inline, static] |
Definition at line 164 of file rtt/os/macosx/fosi.h.
Definition at line 169 of file rtt/os/macosx/fosi.h.
Definition at line 182 of file rtt/os/macosx/fosi.h.
static long long ticks2nano | ( | long long | count | ) | [inline, static] |
Definition at line 136 of file rtt/os/macosx/fosi.h.
Definition at line 96 of file rtt/os/macosx/fosi.h.
const NANO_TIME InfiniteNSecs = LLONG_MAX [static] |
Definition at line 45 of file rtt/os/macosx/fosi.h.
const double InfiniteSeconds = DBL_MAX [static] |
Definition at line 46 of file rtt/os/macosx/fosi.h.
const TICK_TIME InfiniteTicks = LLONG_MAX [static] |
Definition at line 44 of file rtt/os/macosx/fosi.h.