mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-27 23:47:35 +08:00
score: Add and use _TOD_Is_set()
This commit is contained in:
@@ -28,7 +28,7 @@ rtems_status_code rtems_clock_get_seconds_since_epoch(
|
|||||||
if ( !the_interval )
|
if ( !the_interval )
|
||||||
return RTEMS_INVALID_ADDRESS;
|
return RTEMS_INVALID_ADDRESS;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
*the_interval = _TOD_Seconds_since_epoch();
|
*the_interval = _TOD_Seconds_since_epoch();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ rtems_status_code rtems_clock_get_tod(
|
|||||||
if ( !time_buffer )
|
if ( !time_buffer )
|
||||||
return RTEMS_INVALID_ADDRESS;
|
return RTEMS_INVALID_ADDRESS;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
/* Obtain the current time */
|
/* Obtain the current time */
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ rtems_status_code rtems_clock_get_tod_timeval(
|
|||||||
if ( !time )
|
if ( !time )
|
||||||
return RTEMS_INVALID_ADDRESS;
|
return RTEMS_INVALID_ADDRESS;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
_TOD_Get_timeval( time );
|
_TOD_Get_timeval( time );
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ rtems_status_code rtems_task_wake_when(
|
|||||||
{
|
{
|
||||||
Watchdog_Interval seconds;
|
Watchdog_Interval seconds;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
if ( !time_buffer )
|
if ( !time_buffer )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ rtems_status_code rtems_timer_fire_when(
|
|||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
rtems_interval seconds;
|
rtems_interval seconds;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
if ( !_TOD_Validate( wall_time ) )
|
if ( !_TOD_Validate( wall_time ) )
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ rtems_status_code rtems_timer_server_fire_when(
|
|||||||
if ( !timer_server )
|
if ( !timer_server )
|
||||||
return RTEMS_INCORRECT_STATE;
|
return RTEMS_INCORRECT_STATE;
|
||||||
|
|
||||||
if ( !_TOD.is_set )
|
if ( !_TOD_Is_set() )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
if ( !routine )
|
if ( !routine )
|
||||||
|
|||||||
@@ -300,6 +300,11 @@ RTEMS_INLINE_ROUTINE void _TOD_Get_timeval(
|
|||||||
_Timestamp_To_timeval( snapshot_as_timestamp_ptr, time );
|
_Timestamp_To_timeval( snapshot_as_timestamp_ptr, time );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RTEMS_INLINE_ROUTINE bool _TOD_Is_set( void )
|
||||||
|
{
|
||||||
|
return _TOD.is_set;
|
||||||
|
}
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user