I’m looking for semaphore and I did not found if Neutrino support binarie
semaphore?
About counting semaphore, is possible t increment a semaphore greater than
by one?
The timeslice is 50ms and the clock resolution is 10ms. Or ClockPeriod() doc
describe that timeslice is 4xclock period, so timeslice could be 40ms not
50ms. Why this difference?
“Olivier Ménard” wrote:
I’m looking for semaphore and I did not found if Neutrino support binarie
semaphore?
About counting semaphore, is possible t increment a semaphore greater than
by one?
You probably want to use condvar instead of sempahore.
The timeslice is 50ms
Says who? It was 50ms in QNX4 …
and the clock resolution is 10ms. Or ClockPeriod() doc
describe that timeslice is 4xclock period, so timeslice could be 40ms not
50ms. Why this difference?
I think QNX6 use 4x clock period.
“Olivier Menard” <olimen@club-internet.fr> wrote:
I’m looking for semaphore and I did not found if Neutrino support binarie
semaphore?
Neutrino supports counting semaphore – either named or unnamed. For a
binary semaphore, do you mean only two states – locked or unlocked? In
that case, you might look at mutexes – functions pthread_mutex*(). They
are binary – either locked or unlocked.
About counting semaphore, is possible t increment a semaphore greater than
by one?
You can initialize a semaphore to a value greater than one. You can’t
increment it by more than one in a single library call – but you could
do multiple sem_post() calls on the same semaphore:
/* increment semaphore by 3 */
sem_post( &semaphore );
sem_post( &semaphore );
sem_post( &semaphore );
The timeslice is 50ms and the clock resolution is 10ms. Or ClockPeriod() doc
describe that timeslice is 4xclock period, so timeslice could be 40ms not
50ms. Why this difference?
This looks like your documentation is a bit out of date, or we missed an
update in our docs somewhere – these values have changed over time. When
originally shipped, default Clockperiod (also called ticksize or clock
resolution) was 10ms, and timeslice (only affects RR processes) was 50 ms.
Around (I think) Neutrino 2.0, this was changed to be that the clock period
defaulted to 1ms if the processor speed was > 40 MHz, or 10 ms otherwise,
and timeslice default to 4xclock period – giving a value of either 4ms
or 40ms depending on processor speed. Clock period can be modified, the
timeslice multiplier can not.
-David
QNX Training Services
dagibbs@qnx.com