Mercurial > ecos
comparison packages/kernel/current/include/thread.inl @ 2:443894e2e912 ecos-v1_2_1-release
Block commit of eCos version 1.2.1
| author | jlarmour |
|---|---|
| date | Tue, 11 May 1999 12:24:34 +0000 |
| parents | 3111d98ba7b3 |
| children | c38311975d4f |
comparison
equal
deleted
inserted
replaced
| 1:72f549f0d891 | 2:443894e2e912 |
|---|---|
| 1 #ifndef CYGONCE_KERNEL_THREAD_INL | 1 #ifndef CYGONCE_KERNEL_THREAD_INL |
| 2 #define CYGONCE_KERNEL_THREAD_INL | 2 #define CYGONCE_KERNEL_THREAD_INL |
| 3 | 3 |
| 4 //========================================================================== | 4 //========================================================================== |
| 5 // | 5 // |
| 6 // thread.inl | 6 // thread.inl |
| 7 // | 7 // |
| 8 // Thread class inlines | 8 // Thread class inlines |
| 9 // | 9 // |
| 10 //========================================================================== | 10 //========================================================================== |
| 11 //####COPYRIGHTBEGIN#### | 11 //####COPYRIGHTBEGIN#### |
| 12 // | 12 // |
| 13 // ------------------------------------------- | 13 // ------------------------------------------- |
| 23 // | 23 // |
| 24 // The Original Code is eCos - Embedded Cygnus Operating System, released | 24 // The Original Code is eCos - Embedded Cygnus Operating System, released |
| 25 // September 30, 1998. | 25 // September 30, 1998. |
| 26 // | 26 // |
| 27 // The Initial Developer of the Original Code is Cygnus. Portions created | 27 // The Initial Developer of the Original Code is Cygnus. Portions created |
| 28 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. | 28 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
| 29 // ------------------------------------------- | 29 // ------------------------------------------- |
| 30 // | 30 // |
| 31 //####COPYRIGHTEND#### | 31 //####COPYRIGHTEND#### |
| 32 //========================================================================== | 32 //========================================================================== |
| 33 //#####DESCRIPTIONBEGIN#### | 33 //#####DESCRIPTIONBEGIN#### |
| 34 // | 34 // |
| 35 // Author(s): nickg | 35 // Author(s): nickg |
| 36 // Contributors: nickg | 36 // Contributors: nickg |
| 37 // Date: 1997-09-09 | 37 // Date: 1997-09-09 |
| 38 // Purpose: Define inlines for thread classes | 38 // Purpose: Define inlines for thread classes |
| 39 // Description: Inline implementations of various member functions defined | 39 // Description: Inline implementations of various member functions defined |
| 40 // in various Thread classes. | 40 // in various Thread classes. |
| 41 // Usage: | 41 // Usage: |
| 42 // #include <cyg/kernel/thread.hxx> | 42 // #include <cyg/kernel/thread.hxx> |
| 43 // ... | 43 // ... |
| 44 // #include <cyg/kernel/thread.inl> | 44 // #include <cyg/kernel/thread.inl> |
| 45 // ... | 45 // ... |
| 46 | 46 |
| 47 // | 47 // |
| 48 //####DESCRIPTIONEND#### | 48 //####DESCRIPTIONEND#### |
| 49 // | 49 // |
| 50 //========================================================================== | 50 //========================================================================== |
| 60 // ------------------------------------------------------------------------- | 60 // ------------------------------------------------------------------------- |
| 61 // Attach a stack to this thread. If there is a HAL defined macro to | 61 // Attach a stack to this thread. If there is a HAL defined macro to |
| 62 // do this, then we use that, otherwise assume a falling stack. | 62 // do this, then we use that, otherwise assume a falling stack. |
| 63 inline void Cyg_HardwareThread::attach_stack(CYG_ADDRESS s_base, cyg_uint32 s_size) | 63 inline void Cyg_HardwareThread::attach_stack(CYG_ADDRESS s_base, cyg_uint32 s_size) |
| 64 { | 64 { |
| 65 #ifdef CYGNUM_HAL_STACK_SIZE_MINIMUM | |
| 66 CYG_ASSERT( s_size >= CYGNUM_HAL_STACK_SIZE_MINIMUM, | |
| 67 "Stack size too small"); | |
| 68 #endif | |
| 65 stack_base = s_base; | 69 stack_base = s_base; |
| 66 stack_size = s_size; | 70 stack_size = s_size; |
| 67 #ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT | 71 #ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT |
| 68 stack_limit = s_base; | 72 stack_limit = s_base; |
| 69 #endif | 73 #endif |
| 226 self()->Cyg_SchedThread::yield(); | 230 self()->Cyg_SchedThread::yield(); |
| 227 } | 231 } |
| 228 | 232 |
| 229 // ------------------------------------------------------------------------- | 233 // ------------------------------------------------------------------------- |
| 230 | 234 |
| 231 #ifdef CYGSEM_KERNEL_SCHED_MLQUEUE | |
| 232 inline void | 235 inline void |
| 233 Cyg_Thread::rotate_queue( cyg_priority pri ) | 236 Cyg_Thread::rotate_queue( cyg_priority pri ) |
| 234 { | 237 { |
| 235 self()->Cyg_SchedThread::rotate_queue( pri ); | 238 self()->Cyg_SchedThread::rotate_queue( pri ); |
| 236 } | 239 } |
| 237 #endif | 240 |
| 241 // ------------------------------------------------------------------------- | |
| 242 | |
| 243 inline void | |
| 244 Cyg_Thread::to_queue_head( void ) | |
| 245 { | |
| 246 this->Cyg_SchedThread::to_queue_head(); | |
| 247 } | |
| 238 | 248 |
| 239 // ------------------------------------------------------------------------- | 249 // ------------------------------------------------------------------------- |
| 240 | 250 |
| 241 #ifdef CYGIMP_THREAD_PRIORITY | 251 #ifdef CYGIMP_THREAD_PRIORITY |
| 242 | 252 |
