message_queue_send OK from an ISR, but timer_fire_* aren't?
Phil Torre
ptorre at zetron.com
Wed Apr 7 00:45:00 UTC 2004
In the C User's Guide on the page which lists those RTEMS functions
which can be called from an interrupt, I see that message_queue_send
is OK, but timer_fire_after is not.
I looked at the code for timer_fire_after and saw the call to
_Thread_Enable_dispatch(), and thought perhaps that was why this
function is disallowed. But I then looked at message_queue_send,
and see that it also calls _Thread_Enable_dispatch().
1) Does anyone know offhand why timer_fire_* aren't allowed?
2) TSRs run in the context of the clock tick interrupt, right?
Based on that assumption, we have application code which sets
a timer; when the timer fires, the TSR does its thing and
then sends a message to the foreground, which resets the timer
for next time. We had to do that, because the TSR isn't allowed
to call RTEMS timer functions. Right?
3) Is the prohibition against calling timer functions from an ISR of
the "You shouldn't do this, it may be slow" variety, or more the
"You mustn't do this, it will cause the universe to implode" sort?
Thank you!
-Phil
P.S. This very question was asked in this message, but I was unable to find
an on-list reply. Sorry if it's already been answered.
http://www.rtems.com/rtems/maillistArchives/rtems-users/2002/december/msg00150.html
--
=====================================================================
Phil Torre phone: 425-820-6363 x234
Design Engineer email: ptorre at zetron.com
Switching Systems Group fax: 425-820-7031
Zetron, Inc. web: http://www.zetron.com
More information about the users
mailing list