* timer_t invalid value?
@ 2014-02-07 19:44 John Whitmore
0 siblings, 0 replies; only message in thread
From: John Whitmore @ 2014-02-07 19:44 UTC (permalink / raw)
To: kernelnewbies
Hi all, I've got some code, a protocol I wrote, from an embedded processor
which I'm trying to port to Linux User Space, (to run on a Raspberry
Pi). Going to get my embedded device talking to the RPi.
Fortunately I wrote the embedded code so can change it to better fit with the
Linux User Space. In addition I can write a shim layer between my protocol
code and Linux.
My question is about timer_t. I've been searching through documentation but
can't find mention of any value that is considered an invalid timer
identifier. My embedded code's timer creation function would be something like:
timer_id = start_timer(duration, expiry_function);
The returned timer_id if set to the invalid value has not been started. In
addition when an event occurs in the protocol if the timer_id is not that
invalid value then stop the timer. So the timer_id stored tells you if it's
valid and running. As soon as the timer expires the expiry function returns
the value to the INVLAID_TIMER_ID value.
>From what I can tell in Linux there is no such Invalid value. A timer_t is just
an integer and all values are valid. This being the case in my protocol code
I'd have to change it so all timer id's are valid and another variable would
have to store the status/validity of the timer variable. Is this the case?
Just wanted to confirm this before I go re-writing.
Hope that isn't considered off topic, it is linux programming related-ish.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-07 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 19:44 timer_t invalid value? John Whitmore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).