#include <stdlib.h>#include <sys/time.h>#include <pthread.h>#include <signal.h>#include "applicfg.h"#include "timer.h"Include dependency graph for timers_unix.c:

Go to the source code of this file.
Defines | |
| #define | maxval(a, b) ((a>b)?a:b) |
Functions | |
| void | EnterMutex (void) |
| void | LeaveMutex (void) |
| void | timer_notify (sigval_t val) |
| void | initTimer (void) |
| void | StopTimerLoop (void) |
| void | StartTimerLoop (TimerCallback_t init_callback) |
| void | CreateReceiveTask (CAN_PORT port, TASK_HANDLE *Thread, void *ReceiveLoopPtr) |
| void | WaitReceiveTaskEnd (TASK_HANDLE Thread) |
| void | setTimer (TIMEVAL value) |
| TIMEVAL | getElapsedTime (void) |
Variables | |
| pthread_mutex_t | CanFestival_mutex = PTHREAD_MUTEX_INITIALIZER |
| TASK_HANDLE | TimerLoopThread |
| TIMEVAL | last_time_set = TIMEVAL_MAX |
| timeval | last_sig |
| timer_t | timer |
| #define maxval | ( | a, | |||
| b | ) | ((a>b)?a:b) |
| void CreateReceiveTask | ( | CAN_PORT | port, | |
| TASK_HANDLE * | Thread, | |||
| void * | ReceiveLoopPtr | |||
| ) |
| void EnterMutex | ( | void | ) |
Definition at line 20 of file timers_unix.c.
Referenced by canClose(), canOpen(), canReceiveLoop(), canSend(), StartTimerLoop(), StopTimerLoop(), class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc().
| TIMEVAL getElapsedTime | ( | void | ) |
| void initTimer | ( | void | ) |
Definition at line 39 of file timers_unix.c.
References IO_PORTS_8, last_sig, lock(), TCTL1, TIE, timer, timer_notify(), TIOS, TSCR1, TSCR2, and unlock().
Here is the call graph for this function:

| void LeaveMutex | ( | void | ) |
Definition at line 25 of file timers_unix.c.
Referenced by canClose(), canOpen(), canReceiveLoop(), canSend(), StartTimerLoop(), StopTimerLoop(), class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc().
| void setTimer | ( | TIMEVAL | value | ) |
Definition at line 83 of file timers_unix.c.
| void StartTimerLoop | ( | TimerCallback_t | init_callback | ) |
| void StopTimerLoop | ( | void | ) |
| void timer_notify | ( | sigval_t | val | ) |
Definition at line 30 of file timers_unix.c.
References EnterMutex(), last_sig, LeaveMutex(), and TimeDispatch().
Referenced by initTimer().
Here is the call graph for this function:

| void WaitReceiveTaskEnd | ( | TASK_HANDLE | Thread | ) |
| pthread_mutex_t CanFestival_mutex = PTHREAD_MUTEX_INITIALIZER |
| struct timeval last_sig |
Definition at line 16 of file timers_unix.c.
Referenced by getElapsedTime(), initTimer(), and timer_notify().
| TIMEVAL last_time_set = TIMEVAL_MAX |
Definition at line 14 of file timers_unix.c.
| timer_t timer |
Definition at line 18 of file timers_unix.c.
Referenced by initTimer(), setTimer(), and StopTimerLoop().
| TASK_HANDLE TimerLoopThread |
Definition at line 12 of file timers_unix.c.
1.5.1