Mercurial > ecos-v2_0-branch
comparison packages/kernel/current/src/common/kapi.cxx @ 10:d3fbcdfa1b2f ecos-sw-1999-05-29
Merge from eCos master repository on 1999-05-29-00:13:11-BST
| author | jlarmour |
|---|---|
| date | Fri, 28 May 1999 16:43:09 +0000 |
| parents | ece80412419a |
| children | e7ba79f6d3a8 |
comparison
equal
deleted
inserted
replaced
| 9:95cc44ea0068 | 10:d3fbcdfa1b2f |
|---|---|
| 198 externC cyg_handle_t cyg_thread_self() | 198 externC cyg_handle_t cyg_thread_self() |
| 199 { | 199 { |
| 200 return (cyg_handle_t)Cyg_Thread::self(); | 200 return (cyg_handle_t)Cyg_Thread::self(); |
| 201 } | 201 } |
| 202 | 202 |
| 203 // idle thread is not really a plain CygThread; danger. | |
| 204 externC cyg_handle_t cyg_thread_idle_thread() | |
| 205 { | |
| 206 extern Cyg_Thread idle_thread; | |
| 207 return (cyg_handle_t)&idle_thread; | |
| 208 } | |
| 209 | |
| 203 /* Priority manipulation */ | 210 /* Priority manipulation */ |
| 204 externC void cyg_thread_set_priority( | 211 externC void cyg_thread_set_priority( |
| 205 cyg_handle_t thread, cyg_priority_t priority ) | 212 cyg_handle_t thread, cyg_priority_t priority ) |
| 206 { | 213 { |
| 207 #ifdef CYGIMP_THREAD_PRIORITY | 214 #ifdef CYGIMP_THREAD_PRIORITY |
| 231 | 238 |
| 232 externC void cyg_thread_delay(cyg_tick_count_t delay) | 239 externC void cyg_thread_delay(cyg_tick_count_t delay) |
| 233 { | 240 { |
| 234 Cyg_Thread::self()->delay(delay); | 241 Cyg_Thread::self()->delay(delay); |
| 235 } | 242 } |
| 243 | |
| 244 /* Stack information */ | |
| 245 externC cyg_addrword_t cyg_thread_get_stack_base(cyg_handle_t thread) | |
| 246 { | |
| 247 return ((Cyg_Thread *)thread)->get_stack_base(); | |
| 248 } | |
| 249 | |
| 250 externC cyg_uint32 cyg_thread_get_stack_size(cyg_handle_t thread) | |
| 251 { | |
| 252 return ((Cyg_Thread *)thread)->get_stack_size(); | |
| 253 } | |
| 254 | |
| 236 | 255 |
| 237 /*---------------------------------------------------------------------------*/ | 256 /*---------------------------------------------------------------------------*/ |
| 238 /* Per-thread data */ | 257 /* Per-thread data */ |
| 239 | 258 |
| 240 #ifdef CYGVAR_KERNEL_THREADS_DATA | 259 #ifdef CYGVAR_KERNEL_THREADS_DATA |
