dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_thread.c File Reference
#include <pthread.h>
#include <unistd.h>
#include <pios.h>
#include <pios_thread.h>
#include <hwsimulation.h>

Go to the source code of this file.

Functions

bool __attribute__ ((weak))
 
struct pios_thread * PIOS_Thread_WrapCurrentThread (const char *namep)
 Creates a handle for the current thread. More...
 
void PIOS_Thread_ChangePriority (enum pios_thread_prio_e prio)
 
struct pios_thread * PIOS_Thread_Create (void(*fp)(void *), const char *namep, size_t stack_bytes, void *argp, enum pios_thread_prio_e prio)
 
void PIOS_Thread_Delete (struct pios_thread *threadp)
 
static uint32_t PIOS_Thread_GetClock_Impl ()
 
bool PIOS_Thread_FakeClock_IsActive (void)
 
uint32_t PIOS_Thread_Systime (void)
 
void PIOS_Thread_Sleep (uint32_t time_ms)
 
void PIOS_Thread_Sleep_Until (uint32_t *previous_ms, uint32_t increment_ms)
 
uint32_t PIOS_Thread_Get_Stack_Usage (struct pios_thread *threadp)
 
uint32_t PIOS_Thread_Get_Runtime (struct pios_thread *threadp)
 
bool PIOS_Thread_Period_Elapsed (const uint32_t prev_systime, const uint32_t increment_ms)
 Determine if a period has elapsed since a datum. More...
 

Variables

static volatile uint32_t fake_clock
 
static pthread_cond_t fake_clock_cond = PTHREAD_COND_INITIALIZER
 
static pthread_mutex_t fake_clock_mutex = PTHREAD_MUTEX_INITIALIZER