Dokumentacja przestrzeni nazw Thread::Timer
[Timers]


Komponenty

struct  timer_handle
struct  timer_struct

Definicje typów

typedef int(* timer_proc )(int, int)

Funkcje

void initTimerThread ()
struct timer_handle add (timer_proc proc, uint32 interval, int arg1, int arg2)
uint32 remove (struct timer_handle &hndl)
template<typename T, int(*)(T, T) cmp>
uint32 avltree_insert_with_timer (uint32 ticks, struct AvlTree< T, cmp > *tr, T v)
template<typename T, int(*)(T, T) cmp>
int avltree_remove_timer (struct AvlTree< T, cmp > *tr, T *v)
int timer_struct_cmp (struct timer_struct *a, struct timer_struct *b)
class IPC::Lock::lock_t tmrs_lock (const_cast< char * >("timers"))
void TimerThread ()

Zmienne

struct Memory::Heap::heapbox timer_thread_heapbox
class AvlTree< struct
timer_struct
*, timer_struct_cmp > * 
tmrs
class AvlTree< struct
timer_struct
*, timer_struct_cmp > * 
tmrs_pom
volatile uint32 timers_cnt = 0


Opis szczegółowy

The Thread::Timer namespace provides ways of periodically fire routines. The routines are fired if multitasking is enabled, in the timer thread. It is also possible to create a seperate thread for a routine we want to run periodically and sleep it but then it is possible to not conform to the intended interval (ie. sleep(T) makes the actual interval between runs T+time of execution of the routine+scheduler slip).

The Arch::x86::RTC also provides timers which unfortunately may not run timers that access the heap.


Dokumentacja definicji typów

typedef int(* Thread::Timer::timer_proc)(int, int)

Definicja w linii 1671 pliku ip.old.2.cpp.


Dokumentacja funkcji

struct timer_handle Thread::Timer::add ( timer_proc  proc,
uint32  interval,
int  arg1,
int  arg2 
) [read]

Parametry:
proc funkcja zwracajaca 1 po wykonaniu, jesli ma byc wykonana ponownie za [interval] tickow, i 0 jesli ma juz nie byc wykonywana
interval liczba tickow; w sekundzie jest DEF_SECOND tickow; ale resolution jest ograniczona przez scheduler SCHEDULER_FREQUENCY

Definicja w linii 161 pliku timer.cpp.

Odwołuje się do ENTER_CRITICAL, Memory::Heap::heapbox::free(), LEAVE_CRITICAL, lnDb3, IPC::Lock::lock_t::lock(), Memory::Heap::heapbox::malloc(), MAX_TIMERS_CNT, null, sysfail, Thread::Timer::timer_handle::timer_handle(), timer_thread_heapbox, timers_cnt, tmrs, tmrs_lock(), IPC::Lock::lock_t::ulock() i Arch::x86::RTC::up_time.

Odwołania w Net::Arp::arp_get_ether(), Net::Arp::arp_request_timer(), e3c556_irq() i VarieteThread().

template<typename T, int(*)(T, T) cmp>
bool Thread::Timer::avltree_insert_with_timer ( uint32  ticks,
struct AvlTree< T, cmp > *  tr,
v 
) [inline]

insert element into a tree and set a timer to remove it from the tree. special precautions with thread safety required. the tree must not be disposed before the last timer fires the element [v] may be removed from the tree before timer fires

[v] will be copied

Definicja w linii 1699 pliku ip.old.2.cpp.

Odwołuje się do kmalloc i memmove().

Odwołania w Net::IP::ip_transmit() i Net::Arp::processArpPacket().

template<typename T, int(*)(T, T) cmp>
int Thread::Timer::avltree_remove_timer ( struct AvlTree< T, cmp > *  tr,
T *  v 
) [inline]

Definicja w linii 1691 pliku ip.old.2.cpp.

Odwołuje się do kfree.

void Thread::Timer::initTimerThread (  ) 

bool Thread::Timer::remove ( struct timer_handle &  hndl  ) 

int Thread::Timer::timer_struct_cmp ( struct timer_struct *  a,
struct timer_struct *  b 
)

Definicja w linii 58 pliku timer.cpp.

Odwołuje się do Thread::Timer::timer_struct::nextExec.

Odwołania w initTimerThread().

class IPC::Lock::lock_t Thread::Timer::tmrs_lock ( const_cast< char * >  "timers"  ) 

Odwołania w add(), remove() i TimerThread().


Dokumentacja zmiennych

Definicja w linii 37 pliku timer.cpp.

Odwołania w add(), initTimerThread(), remove() i TimerThread().

Definicja w linii 80 pliku timer.cpp.

Odwołania w add(), remove() i TimerThread().

class AvlTree< struct timer_struct *, timer_struct_cmp >* Thread::Timer::tmrs

Definicja w linii 77 pliku timer.cpp.

Odwołania w add(), initTimerThread(), remove() i TimerThread().

class AvlTree< struct timer_struct *, timer_struct_cmp >* Thread::Timer::tmrs_pom

Definicja w linii 78 pliku timer.cpp.

Odwołania w initTimerThread() i TimerThread().


Wygenerowano Sat Jul 19 02:21:28 2008 dla panaLiX programem  doxygen 1.5.6