nico@215: nico@215:
nico@215:#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
#include <signal.h>
#include "applicfg.h"
#include "timer.h"
nico@215: Include dependency graph for timers_unix.c:
nico@215: 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 | nico@215:( | nico@215:a, | |||
nico@215: | nico@215: | b | nico@215:nico@215: | ) | nico@215:((a>b)?a:b) | nico@215:
nico@215: nico@215:
nico@215: Definition at line 82 of file timers_unix.c. nico@215:
nico@215: Referenced by setTimer(). nico@215:
nico@215:
void CreateReceiveTask | nico@215:( | etisserant@240:CAN_PORT | nico@215:port, | nico@215:|
nico@215: | nico@215: | TASK_HANDLE * | nico@215:Thread, | nico@215:|
nico@215: | nico@215: | void * | nico@215:ReceiveLoopPtr | nico@215: |
nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 71 of file timers_unix.c. nico@215:
nico@215: Referenced by canOpen(). nico@215:
void EnterMutex | nico@215:( | nico@215:void | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 20 of file timers_unix.c. nico@215:
nico@215: Referenced by canClose(), canOpen(), canReceiveLoop(), canSend(), StartTimerLoop(), StopTimerLoop(), class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc(). nico@215:
TIMEVAL getElapsedTime | nico@215:( | nico@215:void | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 98 of file timers_unix.c. nico@215:
nico@215: References last_sig. nico@215:
void initTimer | nico@215:( | nico@215:void | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 39 of file timers_unix.c. nico@215:
nico@215: References IO_PORTS_8, last_sig, lock(), TCTL1, TIE, timer, timer_notify(), TIOS, TSCR1, TSCR2, and unlock(). nico@215:
etisserant@240: Here is the call graph for this function:
void LeaveMutex | nico@215:( | nico@215:void | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 25 of file timers_unix.c. nico@215:
nico@215: Referenced by canClose(), canOpen(), canReceiveLoop(), canSend(), StartTimerLoop(), StopTimerLoop(), class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc(). nico@215:
void setTimer | nico@215:( | nico@215:TIMEVAL | nico@215:value | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 83 of file timers_unix.c. nico@215:
void StartTimerLoop | nico@215:( | etisserant@240:TimerCallback_t | nico@215:init_callback | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 62 of file timers_unix.c. nico@215:
nico@215: Referenced by main(). nico@215:
void StopTimerLoop | nico@215:( | nico@215:void | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 55 of file timers_unix.c. nico@215:
nico@215: Referenced by main(). nico@215:
void timer_notify | nico@215:( | nico@215:sigval_t | nico@215:val | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 30 of file timers_unix.c. nico@215:
nico@215: References EnterMutex(), last_sig, LeaveMutex(), and TimeDispatch(). nico@215:
nico@215: Referenced by initTimer(). nico@215:
etisserant@240: Here is the call graph for this function:
void WaitReceiveTaskEnd | nico@215:( | nico@215:TASK_HANDLE | nico@215:Thread | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 76 of file timers_unix.c. nico@215:
nico@215: Referenced by canClose(). nico@215:
nico@215:
pthread_mutex_t CanFestival_mutex = PTHREAD_MUTEX_INITIALIZER | nico@215:
nico@215: nico@215:
nico@215: Definition at line 10 of file timers_unix.c. nico@215:
nico@215: Referenced by EnterMutex(), and LeaveMutex(). nico@215:
etisserant@240: etisserant@240:
struct timeval last_sig | nico@215:
nico@215: nico@215:
nico@215: Definition at line 16 of file timers_unix.c. nico@215:
nico@215: Referenced by getElapsedTime(), initTimer(), and timer_notify(). nico@215:
etisserant@240: etisserant@240:
TIMEVAL last_time_set = TIMEVAL_MAX | nico@215:
nico@215: nico@215:
nico@215: Definition at line 14 of file timers_unix.c. nico@215:
etisserant@240: etisserant@240:
timer_t timer | nico@215:
nico@215: nico@215:
nico@215: Definition at line 18 of file timers_unix.c. nico@215:
nico@215: Referenced by initTimer(), setTimer(), and StopTimerLoop(). nico@215:
etisserant@240: etisserant@240:
TASK_HANDLE TimerLoopThread | nico@215:
nico@215: nico@215:
nico@215: Definition at line 12 of file timers_unix.c. nico@215:
etisserant@240: