From a660e9dc47c522fe1a1b7f6e4af1795dbd6c20b1 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Sep 2022 10:37:05 +0200 Subject: Do not use RTEMS_INLINE_ROUTINE Directly use "static inline" which is available in C99 and later. This brings the RTEMS implementation closer to standard C. Close #3935. --- cpukit/include/rtems/rtems/attrimpl.h | 28 ++++++++++++++-------------- cpukit/include/rtems/rtems/barrierimpl.h | 6 +++--- cpukit/include/rtems/rtems/dpmemimpl.h | 6 +++--- cpukit/include/rtems/rtems/eventimpl.h | 10 +++++----- cpukit/include/rtems/rtems/messageimpl.h | 6 +++--- cpukit/include/rtems/rtems/modesimpl.h | 14 +++++++------- cpukit/include/rtems/rtems/msgmp.h | 2 +- cpukit/include/rtems/rtems/optionsimpl.h | 4 ++-- cpukit/include/rtems/rtems/partimpl.h | 6 +++--- cpukit/include/rtems/rtems/partmp.h | 2 +- cpukit/include/rtems/rtems/ratemonimpl.h | 12 ++++++------ cpukit/include/rtems/rtems/regionimpl.h | 12 ++++++------ cpukit/include/rtems/rtems/semimpl.h | 24 ++++++++++++------------ cpukit/include/rtems/rtems/semmp.h | 2 +- cpukit/include/rtems/rtems/statusimpl.h | 4 ++-- cpukit/include/rtems/rtems/tasksimpl.h | 6 +++--- cpukit/include/rtems/rtems/timerimpl.h | 22 +++++++++++----------- 17 files changed, 83 insertions(+), 83 deletions(-) (limited to 'cpukit/include/rtems/rtems') diff --git a/cpukit/include/rtems/rtems/attrimpl.h b/cpukit/include/rtems/rtems/attrimpl.h index 9321a92048..e5ac35c26a 100644 --- a/cpukit/include/rtems/rtems/attrimpl.h +++ b/cpukit/include/rtems/rtems/attrimpl.h @@ -80,7 +80,7 @@ extern "C" { * This function sets the requested new_attributes in the attribute_set * passed in. The result is returned to the user. */ -RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set ( +static inline rtems_attribute _Attributes_Set ( rtems_attribute new_attributes, rtems_attribute attribute_set ) @@ -95,7 +95,7 @@ RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set ( * This function clears the requested new_attributes in the attribute_set * passed in. The result is returned to the user. */ -RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear ( +static inline rtems_attribute _Attributes_Clear ( rtems_attribute attribute_set, rtems_attribute mask ) @@ -110,7 +110,7 @@ RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear ( * This function returns TRUE if the floating point attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( +static inline bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { @@ -125,7 +125,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( * This function returns TRUE if the global object attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_global( +static inline bool _Attributes_Is_global( rtems_attribute attribute_set ) { @@ -139,7 +139,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_global( * This function returns TRUE if the priority attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority( +static inline bool _Attributes_Is_priority( rtems_attribute attribute_set ) { @@ -153,7 +153,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority( * This function returns TRUE if the binary semaphore attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( +static inline bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { @@ -167,7 +167,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( * This function returns TRUE if the simple binary semaphore attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_simple_binary_semaphore( +static inline bool _Attributes_Is_simple_binary_semaphore( rtems_attribute attribute_set ) { @@ -182,7 +182,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_simple_binary_semaphore( * This function returns TRUE if the counting semaphore attribute is * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( +static inline bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { @@ -196,7 +196,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( * This function returns TRUE if the priority inheritance attribute * is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_inherit_priority( +static inline bool _Attributes_Is_inherit_priority( rtems_attribute attribute_set ) { @@ -210,7 +210,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_inherit_priority( * The protocols are RTEMS_INHERIT_PRIORITY, RTEMS_PRIORITY_CEILING and * RTEMS_MULTIPROCESSOR_RESOURCE_SHARING. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Has_at_most_one_protocol( +static inline bool _Attributes_Has_at_most_one_protocol( rtems_attribute attribute_set ) { @@ -227,7 +227,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Has_at_most_one_protocol( * This function returns TRUE if the priority ceiling attribute * is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority_ceiling( +static inline bool _Attributes_Is_priority_ceiling( rtems_attribute attribute_set ) { @@ -241,7 +241,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority_ceiling( * This function returns TRUE if the Multiprocessor Resource Sharing Protocol * attribute is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_multiprocessor_resource_sharing( +static inline bool _Attributes_Is_multiprocessor_resource_sharing( rtems_attribute attribute_set ) { @@ -255,7 +255,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_multiprocessor_resource_sharing( * This function returns TRUE if the barrier automatic release * attribute is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_barrier_automatic( +static inline bool _Attributes_Is_barrier_automatic( rtems_attribute attribute_set ) { @@ -269,7 +269,7 @@ RTEMS_INLINE_ROUTINE bool _Attributes_Is_barrier_automatic( * This function returns TRUE if the system task attribute * is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Attributes_Is_system_task( +static inline bool _Attributes_Is_system_task( rtems_attribute attribute_set ) { diff --git a/cpukit/include/rtems/rtems/barrierimpl.h b/cpukit/include/rtems/rtems/barrierimpl.h index 9e28ad9cb1..88228b64f9 100644 --- a/cpukit/include/rtems/rtems/barrierimpl.h +++ b/cpukit/include/rtems/rtems/barrierimpl.h @@ -62,7 +62,7 @@ extern "C" { * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ -RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) +static inline Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); } @@ -73,7 +73,7 @@ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) * This routine frees a barrier control block to the * inactive chain of free barrier control blocks. */ -RTEMS_INLINE_ROUTINE void _Barrier_Free ( +static inline void _Barrier_Free ( Barrier_Control *the_barrier ) { @@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE void _Barrier_Free ( _Objects_Free( &_Barrier_Information, &the_barrier->Object ); } -RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get( +static inline Barrier_Control *_Barrier_Get( Objects_Id id, Thread_queue_Context *queue_context ) diff --git a/cpukit/include/rtems/rtems/dpmemimpl.h b/cpukit/include/rtems/rtems/dpmemimpl.h index 7287ab6489..04462335b8 100644 --- a/cpukit/include/rtems/rtems/dpmemimpl.h +++ b/cpukit/include/rtems/rtems/dpmemimpl.h @@ -61,7 +61,7 @@ extern "C" { * This routine allocates a port control block from the inactive chain * of free port control blocks. */ -RTEMS_INLINE_ROUTINE Dual_ported_memory_Control +static inline Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) @@ -75,14 +75,14 @@ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control * This routine frees a port control block to the inactive chain * of free port control blocks. */ -RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( +static inline void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); } -RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get( +static inline Dual_ported_memory_Control *_Dual_ported_memory_Get( Objects_Id id, ISR_lock_Context *lock_context ) diff --git a/cpukit/include/rtems/rtems/eventimpl.h b/cpukit/include/rtems/rtems/eventimpl.h index ae14e5c836..9c0380930a 100644 --- a/cpukit/include/rtems/rtems/eventimpl.h +++ b/cpukit/include/rtems/rtems/eventimpl.h @@ -123,7 +123,7 @@ rtems_status_code _Event_Surrender( * * @param event is the event control block to initialize. */ -RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event ) +static inline void _Event_Initialize( Event_Control *event ) { event->pending_events = 0; } @@ -136,7 +136,7 @@ RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event ) * @return Returns true, if there are no posted events in the event set, * otherwise false. */ -RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty( +static inline bool _Event_sets_Is_empty( rtems_event_set the_event_set ) { @@ -150,7 +150,7 @@ RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty( * * @param the_event_set[in, out] is the event set. */ -RTEMS_INLINE_ROUTINE void _Event_sets_Post( +static inline void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) @@ -168,7 +168,7 @@ RTEMS_INLINE_ROUTINE void _Event_sets_Post( * @return Return the events of the event condition which are posted in the * event set. */ -RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( +static inline rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) @@ -186,7 +186,7 @@ RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( * @return Returns the event set with all event cleared specified by the event * mask. */ -RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( +static inline rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) diff --git a/cpukit/include/rtems/rtems/messageimpl.h b/cpukit/include/rtems/rtems/messageimpl.h index 0bbd104c18..5fbdcadcf6 100644 --- a/cpukit/include/rtems/rtems/messageimpl.h +++ b/cpukit/include/rtems/rtems/messageimpl.h @@ -97,14 +97,14 @@ rtems_status_code _Message_queue_Submit( * This routine deallocates a message queue control block into * the inactive chain of free message queue control blocks. */ -RTEMS_INLINE_ROUTINE void _Message_queue_Free ( +static inline void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); } -RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get( +static inline Message_queue_Control *_Message_queue_Get( Objects_Id id, Thread_queue_Context *queue_context ) @@ -117,7 +117,7 @@ RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get( ); } -RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Allocate( void ) +static inline Message_queue_Control *_Message_queue_Allocate( void ) { return (Message_queue_Control *) _Objects_Allocate( &_Message_queue_Information ); diff --git a/cpukit/include/rtems/rtems/modesimpl.h b/cpukit/include/rtems/rtems/modesimpl.h index d195188774..8cbf655cbb 100644 --- a/cpukit/include/rtems/rtems/modesimpl.h +++ b/cpukit/include/rtems/rtems/modesimpl.h @@ -64,7 +64,7 @@ extern "C" { * This function returns TRUE if mode_set indicates that Asynchronous * Signal Processing is disabled, and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( +static inline bool _Modes_Is_asr_disabled ( rtems_mode mode_set ) { @@ -77,7 +77,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( * This function returns TRUE if mode_set indicates that preemption * is enabled, and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( +static inline bool _Modes_Is_preempt ( rtems_mode mode_set ) { @@ -90,7 +90,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( * This function returns TRUE if mode_set indicates that timeslicing * is enabled, and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( +static inline bool _Modes_Is_timeslice ( rtems_mode mode_set ) { @@ -102,7 +102,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( * * This function returns the interrupt level portion of the mode_set. */ -RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( +static inline ISR_Level _Modes_Get_interrupt_level ( rtems_mode mode_set ) { @@ -119,7 +119,7 @@ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( * @return Returns true, if support for the interrupt level is implemented, * otherwise returns false. */ -RTEMS_INLINE_ROUTINE bool _Modes_Is_interrupt_level_supported( +static inline bool _Modes_Is_interrupt_level_supported( rtems_mode mode_set ) { @@ -142,7 +142,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_interrupt_level_supported( * @return Returns true, if support for the preempt mode is implemented, * otherwise returns false. */ -RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt_mode_supported( +static inline bool _Modes_Is_preempt_mode_supported( rtems_mode mode_set, const Thread_Control *the_thread ) @@ -162,7 +162,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt_mode_supported( * * @param[out] the_thread is the thread to apply the timeslice mode. */ -RTEMS_INLINE_ROUTINE void _Modes_Apply_timeslice_to_thread( +static inline void _Modes_Apply_timeslice_to_thread( rtems_mode mode_set, Thread_Control *the_thread ) diff --git a/cpukit/include/rtems/rtems/msgmp.h b/cpukit/include/rtems/rtems/msgmp.h index ee4a68b0da..ddd5aa11cc 100644 --- a/cpukit/include/rtems/rtems/msgmp.h +++ b/cpukit/include/rtems/rtems/msgmp.h @@ -99,7 +99,7 @@ typedef struct { #define MESSAGE_QUEUE_MP_PACKET_SIZE \ offsetof(Message_queue_MP_Packet, buffer) -RTEMS_INLINE_ROUTINE bool _Message_queue_MP_Is_remote( Objects_Id id ) +static inline bool _Message_queue_MP_Is_remote( Objects_Id id ) { return _Objects_MP_Is_remote( id, &_Message_queue_Information ); } diff --git a/cpukit/include/rtems/rtems/optionsimpl.h b/cpukit/include/rtems/rtems/optionsimpl.h index 58cabaf798..24e861bf9d 100644 --- a/cpukit/include/rtems/rtems/optionsimpl.h +++ b/cpukit/include/rtems/rtems/optionsimpl.h @@ -59,7 +59,7 @@ extern "C" { * This function returns TRUE if the RTEMS_NO_WAIT option is enabled in * option_set, and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( +static inline bool _Options_Is_no_wait ( rtems_option option_set ) { @@ -72,7 +72,7 @@ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( * This function returns TRUE if the RTEMS_EVENT_ANY option is enabled in * OPTION_SET, and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE bool _Options_Is_any ( +static inline bool _Options_Is_any ( rtems_option option_set ) { diff --git a/cpukit/include/rtems/rtems/partimpl.h b/cpukit/include/rtems/rtems/partimpl.h index ac2883e417..2dcea25b81 100644 --- a/cpukit/include/rtems/rtems/partimpl.h +++ b/cpukit/include/rtems/rtems/partimpl.h @@ -62,7 +62,7 @@ extern "C" { * * @return See _Objects_Get(). */ -RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get( +static inline Partition_Control *_Partition_Get( Objects_Id id, ISR_lock_Context *lock_context ) @@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get( * * @param[in, out] lock_context is the lock context set up by _Partition_Get(). */ -RTEMS_INLINE_ROUTINE void _Partition_Acquire_critical( +static inline void _Partition_Acquire_critical( Partition_Control *the_partition, ISR_lock_Context *lock_context ) @@ -96,7 +96,7 @@ RTEMS_INLINE_ROUTINE void _Partition_Acquire_critical( * * @param[in, out] lock_context is the lock context set up by _Partition_Get(). */ -RTEMS_INLINE_ROUTINE void _Partition_Release( +static inline void _Partition_Release( Partition_Control *the_partition, ISR_lock_Context *lock_context ) diff --git a/cpukit/include/rtems/rtems/partmp.h b/cpukit/include/rtems/rtems/partmp.h index 0cae87f0d7..cffde801d8 100644 --- a/cpukit/include/rtems/rtems/partmp.h +++ b/cpukit/include/rtems/rtems/partmp.h @@ -85,7 +85,7 @@ typedef struct { Objects_Id proxy_id; } Partition_MP_Packet; -RTEMS_INLINE_ROUTINE bool _Partition_MP_Is_remote( Objects_Id id ) +static inline bool _Partition_MP_Is_remote( Objects_Id id ) { return _Objects_MP_Is_remote( id, &_Partition_Information ); } diff --git a/cpukit/include/rtems/rtems/ratemonimpl.h b/cpukit/include/rtems/rtems/ratemonimpl.h index aa56266ea4..3874fd4884 100644 --- a/cpukit/include/rtems/rtems/ratemonimpl.h +++ b/cpukit/include/rtems/rtems/ratemonimpl.h @@ -74,13 +74,13 @@ extern "C" { * This function allocates a period control block from * the inactive chain of free period control blocks. */ -RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) +static inline Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); } -RTEMS_INLINE_ROUTINE void _Rate_monotonic_Acquire_critical( +static inline void _Rate_monotonic_Acquire_critical( Rate_monotonic_Control *the_period, ISR_lock_Context *lock_context ) @@ -88,7 +88,7 @@ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Acquire_critical( _ISR_lock_Acquire( &the_period->Lock, lock_context ); } -RTEMS_INLINE_ROUTINE void _Rate_monotonic_Release( +static inline void _Rate_monotonic_Release( Rate_monotonic_Control *the_period, ISR_lock_Context *lock_context ) @@ -96,7 +96,7 @@ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Release( _ISR_lock_Release_and_ISR_enable( &the_period->Lock, lock_context ); } -RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get( +static inline Rate_monotonic_Control *_Rate_monotonic_Get( Objects_Id id, ISR_lock_Context *lock_context ) @@ -137,14 +137,14 @@ void _Rate_monotonic_Cancel( ISR_lock_Context *lock_context ); -RTEMS_INLINE_ROUTINE void _Rate_monotonic_Reset_min_time( +static inline void _Rate_monotonic_Reset_min_time( Timestamp_Control *min_time ) { _Timestamp_Set( min_time, 0x7fffffff, 0x7fffffff ); } -RTEMS_INLINE_ROUTINE void _Rate_monotonic_Reset_statistics( +static inline void _Rate_monotonic_Reset_statistics( Rate_monotonic_Control *the_period ) { diff --git a/cpukit/include/rtems/rtems/regionimpl.h b/cpukit/include/rtems/rtems/regionimpl.h index ec1f1166ed..adb481f3e7 100644 --- a/cpukit/include/rtems/rtems/regionimpl.h +++ b/cpukit/include/rtems/rtems/regionimpl.h @@ -66,7 +66,7 @@ extern "C" { * This function allocates a region control block from * the inactive chain of free region control blocks. */ -RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) +static inline Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); } @@ -77,7 +77,7 @@ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) * This routine frees a region control block to the * inactive chain of free region control blocks. */ -RTEMS_INLINE_ROUTINE void _Region_Free ( +static inline void _Region_Free ( Region_Control *the_region ) { @@ -85,7 +85,7 @@ RTEMS_INLINE_ROUTINE void _Region_Free ( _Objects_Free( &_Region_Information, &the_region->Object ); } -RTEMS_INLINE_ROUTINE Region_Control *_Region_Get_and_lock( Objects_Id id ) +static inline Region_Control *_Region_Get_and_lock( Objects_Id id ) { Region_Control *the_region; @@ -103,7 +103,7 @@ RTEMS_INLINE_ROUTINE Region_Control *_Region_Get_and_lock( Objects_Id id ) return NULL; } -RTEMS_INLINE_ROUTINE void _Region_Unlock( Region_Control *the_region ) +static inline void _Region_Unlock( Region_Control *the_region ) { (void) the_region; _RTEMS_Unlock_allocator(); @@ -116,7 +116,7 @@ RTEMS_INLINE_ROUTINE void _Region_Unlock( Region_Control *the_region ) * If successful, it returns the address of the allocated segment. * Otherwise, it returns NULL. */ -RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( +static inline void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) @@ -129,7 +129,7 @@ RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( * * This function frees the_segment to the_region. */ -RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( +static inline bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) diff --git a/cpukit/include/rtems/rtems/semimpl.h b/cpukit/include/rtems/rtems/semimpl.h index 5518c1d348..5164c593f7 100644 --- a/cpukit/include/rtems/rtems/semimpl.h +++ b/cpukit/include/rtems/rtems/semimpl.h @@ -78,7 +78,7 @@ typedef enum { SEMAPHORE_DISCIPLINE_FIFO } Semaphore_Discipline; -RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Get_flags( +static inline uintptr_t _Semaphore_Get_flags( const Semaphore_Control *the_semaphore ) { @@ -86,7 +86,7 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Get_flags( return (uintptr_t) the_semaphore->Object.Node.previous; } -RTEMS_INLINE_ROUTINE void _Semaphore_Set_flags( +static inline void _Semaphore_Set_flags( Semaphore_Control *the_semaphore, uintptr_t flags ) @@ -95,14 +95,14 @@ RTEMS_INLINE_ROUTINE void _Semaphore_Set_flags( the_semaphore->Object.Node.previous = (Chain_Node *) flags; } -RTEMS_INLINE_ROUTINE Semaphore_Variant _Semaphore_Get_variant( +static inline Semaphore_Variant _Semaphore_Get_variant( uintptr_t flags ) { return (Semaphore_Variant) ( flags & 0x7 ); } -RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_variant( +static inline uintptr_t _Semaphore_Set_variant( uintptr_t flags, Semaphore_Variant variant ) @@ -110,14 +110,14 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_variant( return flags | variant; } -RTEMS_INLINE_ROUTINE Semaphore_Discipline _Semaphore_Get_discipline( +static inline Semaphore_Discipline _Semaphore_Get_discipline( uintptr_t flags ) { return (Semaphore_Discipline) ( ( flags >> 3 ) & 0x1 ); } -RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_discipline( +static inline uintptr_t _Semaphore_Set_discipline( uintptr_t flags, Semaphore_Discipline discipline ) @@ -126,20 +126,20 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_discipline( } #if defined(RTEMS_MULTIPROCESSING) -RTEMS_INLINE_ROUTINE bool _Semaphore_Is_global( +static inline bool _Semaphore_Is_global( uintptr_t flags ) { return ( flags & 0x10 ) != 0; } -RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Make_global( uintptr_t flags ) +static inline uintptr_t _Semaphore_Make_global( uintptr_t flags ) { return flags | 0x10; } #endif -RTEMS_INLINE_ROUTINE const Thread_queue_Operations *_Semaphore_Get_operations( +static inline const Thread_queue_Operations *_Semaphore_Get_operations( uintptr_t flags ) { @@ -163,7 +163,7 @@ RTEMS_INLINE_ROUTINE const Thread_queue_Operations *_Semaphore_Get_operations( * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) +static inline Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); } @@ -175,14 +175,14 @@ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) * This routine frees a semaphore control block to the * inactive chain of free semaphore control blocks. */ -RTEMS_INLINE_ROUTINE void _Semaphore_Free ( +static inline void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); } -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get( +static inline Semaphore_Control *_Semaphore_Get( Objects_Id id, Thread_queue_Context *queue_context ) diff --git a/cpukit/include/rtems/rtems/semmp.h b/cpukit/include/rtems/rtems/semmp.h index 888e2aa480..7fbf5c9046 100644 --- a/cpukit/include/rtems/rtems/semmp.h +++ b/cpukit/include/rtems/rtems/semmp.h @@ -83,7 +83,7 @@ typedef struct { Objects_Id proxy_id; } Semaphore_MP_Packet; -RTEMS_INLINE_ROUTINE bool _Semaphore_MP_Is_remote( Objects_Id id ) +static inline bool _Semaphore_MP_Is_remote( Objects_Id id ) { return _Objects_MP_Is_remote( id, &_Semaphore_Information ); } diff --git a/cpukit/include/rtems/rtems/statusimpl.h b/cpukit/include/rtems/rtems/statusimpl.h index 060ec5ae07..2ea12d9f6c 100644 --- a/cpukit/include/rtems/rtems/statusimpl.h +++ b/cpukit/include/rtems/rtems/statusimpl.h @@ -63,14 +63,14 @@ extern "C" { * @{ */ -RTEMS_INLINE_ROUTINE rtems_status_code _Status_Get( +static inline rtems_status_code _Status_Get( Status_Control status ) { return (rtems_status_code) STATUS_GET_CLASSIC( status ); } -RTEMS_INLINE_ROUTINE rtems_status_code _Status_Get_after_wait( +static inline rtems_status_code _Status_Get_after_wait( const Thread_Control *executing ) { diff --git a/cpukit/include/rtems/rtems/tasksimpl.h b/cpukit/include/rtems/rtems/tasksimpl.h index a10fd75acf..8c87cfc93b 100644 --- a/cpukit/include/rtems/rtems/tasksimpl.h +++ b/cpukit/include/rtems/rtems/tasksimpl.h @@ -75,7 +75,7 @@ rtems_status_code _RTEMS_tasks_Create( RTEMS_tasks_Prepare_stack prepare_stack ); -RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void) +static inline Thread_Control *_RTEMS_tasks_Allocate(void) { _Objects_Allocator_lock(); @@ -99,7 +99,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void) * * @return The corresponding SuperCore priority. */ -RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_Priority_To_core( +static inline Priority_Control _RTEMS_Priority_To_core( const Scheduler_Control *scheduler, rtems_task_priority priority, bool *valid @@ -119,7 +119,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_Priority_To_core( * * @return The corresponding RTEMS API priority. */ -RTEMS_INLINE_ROUTINE rtems_task_priority _RTEMS_Priority_From_core( +static inline rtems_task_priority _RTEMS_Priority_From_core( const Scheduler_Control *scheduler, Priority_Control priority ) diff --git a/cpukit/include/rtems/rtems/timerimpl.h b/cpukit/include/rtems/rtems/timerimpl.h index f74d970e57..8bb95c3be1 100644 --- a/cpukit/include/rtems/rtems/timerimpl.h +++ b/cpukit/include/rtems/rtems/timerimpl.h @@ -80,7 +80,7 @@ extern Timer_server_Control *volatile _Timer_server; * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ -RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) +static inline Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); } @@ -91,14 +91,14 @@ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) * This routine frees a timer control block to the * inactive chain of free timer control blocks. */ -RTEMS_INLINE_ROUTINE void _Timer_Free ( +static inline void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); } -RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get( +static inline Timer_Control *_Timer_Get( Objects_Id id, ISR_lock_Context *lock_context ) @@ -110,7 +110,7 @@ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get( ); } -RTEMS_INLINE_ROUTINE Per_CPU_Control *_Timer_Acquire_critical( +static inline Per_CPU_Control *_Timer_Acquire_critical( Timer_Control *the_timer, ISR_lock_Context *lock_context ) @@ -123,7 +123,7 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Timer_Acquire_critical( return cpu; } -RTEMS_INLINE_ROUTINE void _Timer_Release( +static inline void _Timer_Release( Per_CPU_Control *cpu, ISR_lock_Context *lock_context ) @@ -132,7 +132,7 @@ RTEMS_INLINE_ROUTINE void _Timer_Release( _ISR_lock_ISR_enable( lock_context ); } -RTEMS_INLINE_ROUTINE bool _Timer_Is_interval_class( +static inline bool _Timer_Is_interval_class( Timer_Classes the_class ) { @@ -142,7 +142,7 @@ RTEMS_INLINE_ROUTINE bool _Timer_Is_interval_class( return ( the_class & mask ) == TIMER_CLASS_BIT_NOT_DORMANT; } -RTEMS_INLINE_ROUTINE bool _Timer_Is_on_task_class( +static inline bool _Timer_Is_on_task_class( Timer_Classes the_class ) { @@ -152,14 +152,14 @@ RTEMS_INLINE_ROUTINE bool _Timer_Is_on_task_class( return ( the_class & mask ) == mask; } -RTEMS_INLINE_ROUTINE Per_CPU_Watchdog_index _Timer_Watchdog_header_index( +static inline Per_CPU_Watchdog_index _Timer_Watchdog_header_index( Timer_Classes the_class ) { return (Per_CPU_Watchdog_index) ( the_class & TIMER_CLASS_BIT_TIME_OF_DAY ); } -RTEMS_INLINE_ROUTINE Watchdog_Interval _Timer_Get_CPU_ticks( +static inline Watchdog_Interval _Timer_Get_CPU_ticks( const Per_CPU_Control *cpu ) { @@ -199,7 +199,7 @@ void _Timer_Routine_adaptor( Watchdog_Control *the_watchdog ); void _Timer_server_Routine_adaptor( Watchdog_Control *the_watchdog ); -RTEMS_INLINE_ROUTINE void _Timer_server_Acquire_critical( +static inline void _Timer_server_Acquire_critical( Timer_server_Control *timer_server, ISR_lock_Context *lock_context ) @@ -207,7 +207,7 @@ RTEMS_INLINE_ROUTINE void _Timer_server_Acquire_critical( _ISR_lock_Acquire( &timer_server->Lock, lock_context ); } -RTEMS_INLINE_ROUTINE void _Timer_server_Release_critical( +static inline void _Timer_server_Release_critical( Timer_server_Control *timer_server, ISR_lock_Context *lock_context ) -- cgit v1.2.3