trick/trick_source/sim_services/Timer/it_handler.cpp

20 lines
494 B
C++
Raw Normal View History

/*
2015-02-26 15:02:31 +00:00
PURPOSE: ( Interval timer/external interrupt alarm signal handler )
PROGRAMMERS: (((Robert W. Bailey) (LinCom) (April 1992) (--) (Realtime)))
*/
#include "trick/ITimer.hh"
2015-02-26 15:02:31 +00:00
/**
@relates Trick::ITimer
@brief Signal handler for itimer based sleep timer
2015-02-26 15:02:31 +00:00
@param sig - signal number
@details
-# call sem_post() on the itimer semaphore
2015-02-26 15:02:31 +00:00
*/
void it_handler(int sig __attribute__ ((unused))) {
// Tell the scheduler to wait up from its sleepy time.
get_itimer()->semaphore_post() ;
}