TM :: timer support. More...
#include "defs.h"#include "../../compiler_opt.h"#include "lock.h"#include "../../timer.h"#include "h_table.h"#include "config.h"

Go to the source code of this file.
TM timer support. It has been designed for high performance using some techniques of which timer users need to be aware.
The following example shows it:
PROCESS1 TIMER PROCESS
So be careful when writing the timer handlers. Currently defined timers don't hurt if they hit delayed, I hope at least. Retransmission timer may results in a useless retransmission -- not too bad. FR timer not too bad either as timer processing uses a REPLY mutex making it safe to other processing affecting transaction state. Wait timer not bad either -- processes putting a transaction on wait don't do anything with it anymore.
Example when it does not hurt:
PROCESS1 TIMER PROCESS
The rule of thumb is don't touch data you put under a timer. Create data, put them under a timer, and let them live until they are safely destroyed from wait/delete timer. The only safe place to manipulate the data is from timer process in which delayed timers cannot hit (all timers are processed sequentially).
A "bad example" -- rewriting content of retransmission buffer in an unprotected way is bad because a delayed retransmission timer might hit. Thats why our reply retransmission procedure is enclosed in a REPLY_LOCK.
Definition in file modules/tm/timer.h.
Fixup function for the timer values, (called by the configuration framework)
| handle | not used | |
| gname | not used | |
| name | not used | |
| val | fixed timer value |
Definition at line 255 of file modules/tm/timer.c.
References IF_IS_TIMER_NAME, and MS_TO_TICKS.
(called by the configuration framework) It checks if the value fits in the tm structures
Definition at line 282 of file modules/tm/timer.c.
References IF_IS_TIMER_NAME.
1.7.1