diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-05 12:08:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-07 17:02:26 +0200 |
commit | 4fc370e3c64c510d43d1e8808d664513baca2ad7 (patch) | |
tree | cb2734e3c4cdb8ccda3bfaf1740ed7d2ab78f3a2 /cpukit/score/inline/rtems/score/thread.inl | |
parent | score: Simplify _CORE_mutex_Seize_interrupt_try* (diff) | |
download | rtems-4fc370e3c64c510d43d1e8808d664513baca2ad7.tar.bz2 |
score: Move thread dispatch content to new file
Move thread dispatch declarations and inline functions to new header
<rtems/score/threaddispatch.h> to make it independent of the
Thread_Control structure. This avoids a cyclic dependency in case
thread dispatch functions are used for the object implementation.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/inline/rtems/score/thread.inl | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl index a42da1d5b8..e6e192901d 100644 --- a/cpukit/score/inline/rtems/score/thread.inl +++ b/cpukit/score/inline/rtems/score/thread.inl @@ -31,91 +31,6 @@ */ /**@{**/ -#if defined(RTEMS_SMP) - - /* - * The _Thread_Dispatch_... functions are prototyped in thread.h. - */ - -#else - - /** - * @brief _Thread_Dispatch_in_critical_section - * - * This routine returns true if thread dispatch indicates - * that we are in a critical section. - */ - RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) - { - if ( _Thread_Dispatch_disable_level == 0 ) - return false; - - return true; - } - - /** - * @brief Get thread dispatch disable level. - * - * This routine returns value of the the thread dispatch level. - */ - RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_get_disable_level(void) - { - return _Thread_Dispatch_disable_level; - } - - /** - * @brief Set thread dispatch disable level. - * - * This routine sets thread dispatch level to the - * value passed in. - */ - RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) - { - _Thread_Dispatch_disable_level = value; - return value; - } - - /** - * @brief Increase thread dispatch disable level. - * - * This rountine increments the thread dispatch level - */ - RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) - { - uint32_t level = _Thread_Dispatch_disable_level; - - ++level; - _Thread_Dispatch_disable_level = level; - - return level; - } - - /** - * @brief Decrease thread dispatch disable level. - * - * This routine decrements the thread dispatch level. - */ - RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) - { - uint32_t level = _Thread_Dispatch_disable_level; - - --level; - _Thread_Dispatch_disable_level = level; - - return level; - } - - /** - * @brief Thread dispatch initialization. - * - * This routine initializes the thread dispatching subsystem. - */ - RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) - { - _Thread_Dispatch_set_disable_level( 1 ); - } - -#endif /** * This routine halts multitasking and returns control to @@ -237,61 +152,6 @@ RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) #endif /** - * This routine prevents dispatching. - */ - -#if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ ) -void _Thread_Disable_dispatch( void ); -#else -RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) -{ - _Thread_Dispatch_increment_disable_level(); - RTEMS_COMPILER_MEMORY_BARRIER(); -} -#endif - -/** - * This routine allows dispatching to occur again. If this is - * the outer most dispatching critical section, then a dispatching - * operation will be performed and, if necessary, control of the - * processor will be transferred to the heir thread. - */ - -#if defined ( __THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) - void _Thread_Enable_dispatch( void ); -#else - /* inlining of enable dispatching must be true */ - RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch( void ) - { - RTEMS_COMPILER_MEMORY_BARRIER(); - if ( _Thread_Dispatch_decrement_disable_level() == 0 ) - _Thread_Dispatch(); - } -#endif - -/** - * This routine allows dispatching to occur again. However, - * no dispatching operation is performed even if this is the outer - * most dispatching critical section. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) -{ - RTEMS_COMPILER_MEMORY_BARRIER(); - _Thread_Dispatch_decrement_disable_level(); -} - -/** - * This function returns true if dispatching is disabled, and false - * otherwise. - */ - -RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) -{ - return ( _Thread_Dispatch_in_critical_section() == false ); -} - -/** * This function returns true if dispatching is disabled, and false * otherwise. */ |