37 static void _Thread_queue_Add_timeout_timespec(
43 const struct timespec *now
46 const struct timespec *abstime;
53 if ( abstime->tv_sec < 0 ) {
65 &the_thread->
Timer.Lock,
69 the_thread->
Timer.header = header;
72 &the_thread->
Timer.Watchdog,
79 &the_thread->
Timer.Lock,
100 _Thread_queue_Add_timeout_timespec(
120 _Thread_queue_Add_timeout_timespec(
Watchdog_Interval ticks
The timeout in ticks.
Index for realtime clock per-CPU watchdog header.
void _Timecounter_Getnanotime(struct timespec *ts)
Returns the wall clock time in the timespec format.
static __inline__ void _Thread_Add_timeout_ticks(Thread_Control *the_thread, Per_CPU_Control *cpu, Watchdog_Interval ticks)
Adds timeout ticks to the thread.
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
#define WATCHDOG_MAXIMUM_TICKS
The maximum watchdog ticks value for the far future.
#define _ISR_lock_Release_and_ISR_enable(_lock, _context)
Releases an ISR lock.
Watchdog_Header Header[PER_CPU_WATCHDOG_COUNT]
Header for watchdogs.
Thread queue context for the thread queue methods.
static __inline__ uint64_t _Watchdog_Ticks_from_timespec(const struct timespec *ts)
Converts the timespec in ticks.
Inlined Routines in the Watchdog Handler.
void _Thread_Continue(Thread_Control *the_thread, Status_Control status)
Cancels a blocking operation so that the thread can continue its execution.
static __inline__ bool _Watchdog_Is_valid_timespec(const struct timespec *ts)
Checks if the timespec is a valid timespec for a watchdog.
Watchdog_Service_routine_entry routine
This field is the function to invoke.
static __inline__ uint64_t _Watchdog_Per_CPU_insert(Watchdog_Control *the_watchdog, Per_CPU_Control *cpu, Watchdog_Header *header, uint64_t expire)
Sets the watchdog's cpu and inserts it with the given expiration time in the scheduled watchdogs...
void _Thread_Timeout(Watchdog_Control *the_watchdog)
General purpose thread wait timeout.
struct Per_CPU_Control::@13 Watchdog
Watchdog state for this processor.
Constants and Structures Associated with the Manipulation of Objects.
#define WATCHDOG_NO_TIMEOUT
Special watchdog ticks value to indicate an infinite wait.
void _Thread_queue_Add_timeout_ticks(Thread_queue_Queue *queue, Thread_Control *the_thread, Per_CPU_Control *cpu_self, Thread_queue_Context *queue_context)
Adds timeout ticks of the queue to the thread.
void _Timecounter_Getnanouptime(struct timespec *ts)
Returns the uptime in the timespec format.
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
void _Thread_queue_Add_timeout_monotonic_timespec(Thread_queue_Queue *queue, Thread_Control *the_thread, Per_CPU_Control *cpu_self, Thread_queue_Context *queue_context)
Adds a monotonic timespec to the thread and sets the watchdog header to monotonic.
Inlined Routines from the Thread Handler.
const void * arg
The timeout argument, e.g. pointer to struct timespec.
Index for monotonic clock per-CPU watchdog header.
void _Thread_queue_Add_timeout_realtime_timespec(Thread_queue_Queue *queue, Thread_Control *the_thread, Per_CPU_Control *cpu_self, Thread_queue_Context *queue_context)
Adds a monotonic timespec to the thread and sets the watchdog header to realtime. ...
Local ISR lock context for acquire and release pairs.
static __inline__ bool _Watchdog_Is_far_future_timespec(const struct timespec *ts)
Checks if the timespec is too far in the future.
union Thread_queue_Context::@29 Timeout
Interval to wait.
Thread_Timer_information Timer