RTEMS CPU Kit with SuperCore  4.11.3
Files | Enumerations | Functions
POSIX Time Types
Collaboration diagram for POSIX Time Types:

Files

file  posixtimespecabsolutetimeout.c
 Convert Absolute Timeout to Ticks.
 

Enumerations

enum  POSIX_Absolute_timeout_conversion_results_t { POSIX_ABSOLUTE_TIMEOUT_INVALID, POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, POSIX_ABSOLUTE_TIMEOUT_IS_NOW, POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE }
 Absolute timeout conversion results. More...
 

Functions

POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks (const struct timespec *abstime, Watchdog_Interval *ticks_out)
 Convert absolute timeout to ticks. More...
 

Detailed Description

Enumeration Type Documentation

◆ POSIX_Absolute_timeout_conversion_results_t

Absolute timeout conversion results.

This enumeration defines the possible results of converting an absolute time used for timeouts to POSIX blocking calls to a number of ticks.

Enumerator
POSIX_ABSOLUTE_TIMEOUT_INVALID 

The timeout is invalid.

POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST 

The timeout represents a time that is in the past.

POSIX_ABSOLUTE_TIMEOUT_IS_NOW 

The timeout represents a time that is equal to the current time.

POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE 

The timeout represents a time that is in the future.

Function Documentation

◆ _POSIX_Absolute_timeout_to_ticks()

POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks ( const struct timespec *  abstime,
Watchdog_Interval ticks_out 
)

Convert absolute timeout to ticks.

This method takes an absolute time being used as a timeout to a blocking directive, validates it and returns the number of corresponding clock ticks for use by the SuperCore.

Parameters
[in]abstimeis a pointer to the timeout
[out]ticks_outwill contain the number of ticks
Returns
This method returns the number of ticks in ticks_out and a status value indicating whether the absolute time is valid, in the past, equal to the current time or in the future as it should be.

References _Timespec_Is_valid(), and POSIX_ABSOLUTE_TIMEOUT_INVALID.