04.11.2011 - adjust for Windows & QNX, multiprotocol, repeater, signals, process, codec, console input

This commit is contained in:
peri4
2011-11-04 15:33:15 +03:00
parent 39ec9cac5c
commit e25553b97b
32 changed files with 468 additions and 294 deletions

View File

@@ -32,10 +32,30 @@ void PITimer::timer_event(sigval e) {
PITimer * ct = (PITimer * )e.sival_ptr;
if (ct->ret_func != 0) {
if (ct->lockRun) ct->lock();
ct->ret_func(ct->data);
ct->ret_func(ct->data, 1);
piForeach (TimerSlot & i, ct->ret_funcs) {
if (i.delim > ++(i.tick)) continue;
i.tick = 0;
if (i.slot != 0) i.slot(ct->data, i.delim);
else ct->ret_func(ct->data, i.delim);
}
if (ct->lockRun) ct->unlock();
}
}
#else
void PITimer::run() {
if (ret_func != 0) {
if (lockRun) lock();
ret_func(data, 1);
piForeach (TimerSlot & i, ret_funcs) {
if (i.delim > ++(i.tick)) continue;
i.tick = 0;
if (i.slot != 0) i.slot(data, i.delim);
else ret_func(data, i.delim);
}
if (lockRun) unlock();
}
}
#endif