1 | /* thread.h |
---|
2 | * |
---|
3 | * This include file contains all constants and structures associated |
---|
4 | * with the thread control block. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1998. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * Copyright assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.OARcorp.com/rtems/license.html. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __THREAD_h |
---|
18 | #define __THREAD_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/score/context.h> |
---|
25 | #include <rtems/score/cpu.h> |
---|
26 | #if defined(RTEMS_MULTIPROCESSING) |
---|
27 | #include <rtems/score/mppkt.h> |
---|
28 | #endif |
---|
29 | #include <rtems/score/object.h> |
---|
30 | #include <rtems/score/priority.h> |
---|
31 | #include <rtems/score/stack.h> |
---|
32 | #include <rtems/score/states.h> |
---|
33 | #include <rtems/score/tod.h> |
---|
34 | #include <rtems/score/tqdata.h> |
---|
35 | #include <rtems/score/watchdog.h> |
---|
36 | |
---|
37 | /* |
---|
38 | * The following defines the "return type" of a thread. |
---|
39 | */ |
---|
40 | |
---|
41 | typedef void Thread; |
---|
42 | |
---|
43 | /* |
---|
44 | * The following defines the ways in which the entry point for a |
---|
45 | * thread can be invoked. Basically, it can be passed any |
---|
46 | * combination/permutation of a pointer and an unsigned32 value. |
---|
47 | * |
---|
48 | * NOTE: For now, we are ignoring the return type. |
---|
49 | */ |
---|
50 | |
---|
51 | typedef enum { |
---|
52 | THREAD_START_NUMERIC, |
---|
53 | THREAD_START_POINTER, |
---|
54 | THREAD_START_BOTH_POINTER_FIRST, |
---|
55 | THREAD_START_BOTH_NUMERIC_FIRST |
---|
56 | } Thread_Start_types; |
---|
57 | |
---|
58 | typedef Thread ( *Thread_Entry )(); /* basic type */ |
---|
59 | |
---|
60 | typedef Thread ( *Thread_Entry_numeric )( unsigned32 ); |
---|
61 | typedef Thread ( *Thread_Entry_pointer )( void * ); |
---|
62 | typedef Thread ( *Thread_Entry_both_pointer_first )( void *, unsigned32 ); |
---|
63 | typedef Thread ( *Thread_Entry_both_numeric_first )( unsigned32, void * ); |
---|
64 | |
---|
65 | /* |
---|
66 | * The following lists the algorithms used to manage the thread cpu budget. |
---|
67 | * |
---|
68 | * Reset Timeslice: At each context switch, reset the time quantum. |
---|
69 | * Exhaust Timeslice: Only reset the quantum once it is consumed. |
---|
70 | * Callout: Execute routine when budget is consumed. |
---|
71 | */ |
---|
72 | |
---|
73 | typedef enum { |
---|
74 | THREAD_CPU_BUDGET_ALGORITHM_NONE, |
---|
75 | THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE, |
---|
76 | THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, |
---|
77 | THREAD_CPU_BUDGET_ALGORITHM_CALLOUT |
---|
78 | } Thread_CPU_budget_algorithms; |
---|
79 | |
---|
80 | typedef struct Thread_Control_struct Thread_Control; |
---|
81 | |
---|
82 | typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * ); |
---|
83 | |
---|
84 | /* |
---|
85 | * The following structure contains the information which defines |
---|
86 | * the starting state of a thread. |
---|
87 | */ |
---|
88 | |
---|
89 | typedef struct { |
---|
90 | Thread_Entry entry_point; /* starting thread address */ |
---|
91 | Thread_Start_types prototype; /* how task is invoked */ |
---|
92 | void *pointer_argument; /* pointer argument */ |
---|
93 | unsigned32 numeric_argument; /* numeric argument */ |
---|
94 | /* initial execution modes */ |
---|
95 | boolean is_preemptible; |
---|
96 | Thread_CPU_budget_algorithms budget_algorithm; |
---|
97 | Thread_CPU_budget_algorithm_callout budget_callout; |
---|
98 | unsigned32 isr_level; |
---|
99 | Priority_Control initial_priority; /* initial priority */ |
---|
100 | boolean core_allocated_stack; |
---|
101 | Stack_Control Initial_stack; /* stack information */ |
---|
102 | void *fp_context; /* initial FP context area address */ |
---|
103 | void *stack; /* initial stack area address */ |
---|
104 | } Thread_Start_information; |
---|
105 | |
---|
106 | /* |
---|
107 | * The following structure contains the information necessary to manage |
---|
108 | * a thread which it is waiting for a resource. |
---|
109 | */ |
---|
110 | |
---|
111 | #define THREAD_STATUS_PROXY_BLOCKING 0x1111111 |
---|
112 | |
---|
113 | typedef struct { |
---|
114 | Objects_Id id; /* waiting on this object */ |
---|
115 | unsigned32 count; /* "generic" fields to be used */ |
---|
116 | void *return_argument; /* when blocking */ |
---|
117 | void *return_argument_1; |
---|
118 | unsigned32 option; |
---|
119 | |
---|
120 | /* |
---|
121 | * NOTE: The following assumes that all API return codes can be |
---|
122 | * treated as an unsigned32. |
---|
123 | */ |
---|
124 | unsigned32 return_code; /* status for thread awakened */ |
---|
125 | |
---|
126 | Chain_Control Block2n; /* 2 - n priority blocked chain */ |
---|
127 | Thread_queue_Control *queue; /* pointer to thread queue */ |
---|
128 | } Thread_Wait_information; |
---|
129 | |
---|
130 | /* |
---|
131 | * The following defines the control block used to manage |
---|
132 | * each thread proxy. |
---|
133 | * |
---|
134 | * NOTE: It is critical that proxies and threads have identical |
---|
135 | * memory images for the shared part. |
---|
136 | */ |
---|
137 | |
---|
138 | typedef struct { |
---|
139 | Objects_Control Object; |
---|
140 | States_Control current_state; |
---|
141 | Priority_Control current_priority; |
---|
142 | Priority_Control real_priority; |
---|
143 | unsigned32 resource_count; |
---|
144 | Thread_Wait_information Wait; |
---|
145 | Watchdog_Control Timer; |
---|
146 | #if defined(RTEMS_MULTIPROCESSING) |
---|
147 | MP_packet_Prefix *receive_packet; |
---|
148 | #endif |
---|
149 | /****************** end of common block ********************/ |
---|
150 | Chain_Node Active; |
---|
151 | } Thread_Proxy_control; |
---|
152 | |
---|
153 | |
---|
154 | /* |
---|
155 | * The following record defines the control block used |
---|
156 | * to manage each thread. |
---|
157 | * |
---|
158 | * NOTE: It is critical that proxies and threads have identical |
---|
159 | * memory images for the shared part. |
---|
160 | */ |
---|
161 | |
---|
162 | typedef enum { |
---|
163 | THREAD_API_RTEMS, |
---|
164 | THREAD_API_POSIX |
---|
165 | } Thread_APIs; |
---|
166 | |
---|
167 | #define THREAD_API_FIRST THREAD_API_RTEMS |
---|
168 | #define THREAD_API_LAST THREAD_API_POSIX |
---|
169 | |
---|
170 | struct Thread_Control_struct { |
---|
171 | Objects_Control Object; |
---|
172 | States_Control current_state; |
---|
173 | Priority_Control current_priority; |
---|
174 | Priority_Control real_priority; |
---|
175 | unsigned32 resource_count; |
---|
176 | Thread_Wait_information Wait; |
---|
177 | Watchdog_Control Timer; |
---|
178 | #if defined(RTEMS_MULTIPROCESSING) |
---|
179 | MP_packet_Prefix *receive_packet; |
---|
180 | #endif |
---|
181 | /****************** end of common block ********************/ |
---|
182 | boolean is_global; |
---|
183 | boolean do_post_task_switch_extension; |
---|
184 | |
---|
185 | boolean is_preemptible; |
---|
186 | void *rtems_ada_self; |
---|
187 | unsigned32 cpu_time_budget; |
---|
188 | Thread_CPU_budget_algorithms budget_algorithm; |
---|
189 | Thread_CPU_budget_algorithm_callout budget_callout; |
---|
190 | |
---|
191 | unsigned32 ticks_executed; |
---|
192 | Chain_Control *ready; |
---|
193 | Priority_Information Priority_map; |
---|
194 | Thread_Start_information Start; |
---|
195 | Context_Control Registers; |
---|
196 | void *fp_context; |
---|
197 | void *API_Extensions[ THREAD_API_LAST + 1 ]; |
---|
198 | void **extensions; |
---|
199 | }; |
---|
200 | |
---|
201 | /* |
---|
202 | * Self for the GNU Ada Run-Time |
---|
203 | */ |
---|
204 | |
---|
205 | SCORE_EXTERN void *rtems_ada_self; |
---|
206 | |
---|
207 | /* |
---|
208 | * The following defines the information control block used to |
---|
209 | * manage this class of objects. |
---|
210 | */ |
---|
211 | |
---|
212 | SCORE_EXTERN Objects_Information _Thread_Internal_information; |
---|
213 | |
---|
214 | /* |
---|
215 | * The following define the thread control pointers used to access |
---|
216 | * and manipulate the idle thread. |
---|
217 | */ |
---|
218 | |
---|
219 | SCORE_EXTERN Thread_Control *_Thread_Idle; |
---|
220 | |
---|
221 | /* |
---|
222 | * The following context area contains the context of the "thread" |
---|
223 | * which invoked the start multitasking routine. This context is |
---|
224 | * restored as the last action of the stop multitasking routine. Thus |
---|
225 | * control of the processor can be returned to the environment |
---|
226 | * which initiated the system. |
---|
227 | */ |
---|
228 | |
---|
229 | SCORE_EXTERN Context_Control _Thread_BSP_context; |
---|
230 | |
---|
231 | /* |
---|
232 | * The following declares the dispatch critical section nesting |
---|
233 | * counter which is used to prevent context switches at inopportune |
---|
234 | * moments. |
---|
235 | */ |
---|
236 | |
---|
237 | SCORE_EXTERN volatile unsigned32 _Thread_Dispatch_disable_level; |
---|
238 | |
---|
239 | /* |
---|
240 | * If this is non-zero, then the post-task switch extension |
---|
241 | * is run regardless of the state of the per thread flag. |
---|
242 | */ |
---|
243 | |
---|
244 | SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension; |
---|
245 | |
---|
246 | /* |
---|
247 | * The following holds how many user extensions are in the system. This |
---|
248 | * is used to determine how many user extension data areas to allocate |
---|
249 | * per thread. |
---|
250 | */ |
---|
251 | |
---|
252 | SCORE_EXTERN unsigned32 _Thread_Maximum_extensions; |
---|
253 | |
---|
254 | /* |
---|
255 | * The following is used to manage the length of a timeslice quantum. |
---|
256 | */ |
---|
257 | |
---|
258 | SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice; |
---|
259 | |
---|
260 | /* |
---|
261 | * The following points to the array of FIFOs used to manage the |
---|
262 | * set of ready threads. |
---|
263 | */ |
---|
264 | |
---|
265 | SCORE_EXTERN Chain_Control *_Thread_Ready_chain; |
---|
266 | |
---|
267 | /* |
---|
268 | * The following points to the thread which is currently executing. |
---|
269 | * This thread is implicitly manipulated by numerous directives. |
---|
270 | */ |
---|
271 | |
---|
272 | SCORE_EXTERN Thread_Control *_Thread_Executing; |
---|
273 | |
---|
274 | /* |
---|
275 | * The following points to the highest priority ready thread |
---|
276 | * in the system. Unless the current thread is not preemptibl, |
---|
277 | * then this thread will be context switched to when the next |
---|
278 | * dispatch occurs. |
---|
279 | */ |
---|
280 | |
---|
281 | SCORE_EXTERN Thread_Control *_Thread_Heir; |
---|
282 | |
---|
283 | /* |
---|
284 | * The following points to the thread whose floating point |
---|
285 | * context is currently loaded. |
---|
286 | */ |
---|
287 | |
---|
288 | SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; |
---|
289 | |
---|
290 | /* |
---|
291 | * _Thread_Handler_initialization |
---|
292 | * |
---|
293 | * DESCRIPTION: |
---|
294 | * |
---|
295 | * This routine performs the initialization necessary for this handler. |
---|
296 | */ |
---|
297 | |
---|
298 | void _Thread_Handler_initialization ( |
---|
299 | unsigned32 ticks_per_timeslice, |
---|
300 | unsigned32 maximum_extensions, |
---|
301 | unsigned32 maximum_proxies |
---|
302 | ); |
---|
303 | |
---|
304 | /* |
---|
305 | * _Thread_Create_idle |
---|
306 | * |
---|
307 | * DESCRIPTION: |
---|
308 | * |
---|
309 | * This routine creates the idle thread. |
---|
310 | * |
---|
311 | * WARNING!! No thread should be created before this one. |
---|
312 | */ |
---|
313 | |
---|
314 | void _Thread_Create_idle( void ); |
---|
315 | |
---|
316 | /* |
---|
317 | * _Thread_Start_multitasking |
---|
318 | * |
---|
319 | * DESCRIPTION: |
---|
320 | * |
---|
321 | * This routine initiates multitasking. It is invoked only as |
---|
322 | * part of initialization and its invocation is the last act of |
---|
323 | * the non-multitasking part of the system initialization. |
---|
324 | */ |
---|
325 | |
---|
326 | void _Thread_Start_multitasking( void ); |
---|
327 | |
---|
328 | /* |
---|
329 | * _Thread_Dispatch |
---|
330 | * |
---|
331 | * DESCRIPTION: |
---|
332 | * |
---|
333 | * This routine is responsible for transferring control of the |
---|
334 | * processor from the executing thread to the heir thread. As part |
---|
335 | * of this process, it is responsible for the following actions: |
---|
336 | * |
---|
337 | * + saving the context of the executing thread |
---|
338 | * + restoring the context of the heir thread |
---|
339 | * + dispatching any signals for the resulting executing thread |
---|
340 | */ |
---|
341 | |
---|
342 | void _Thread_Dispatch( void ); |
---|
343 | |
---|
344 | /* |
---|
345 | * _Thread_Stack_Allocate |
---|
346 | * |
---|
347 | * DESCRIPTION: |
---|
348 | * |
---|
349 | * Allocate the requested stack space for the thread. |
---|
350 | * return the actual size allocated after any adjustment |
---|
351 | * or return zero if the allocation failed. |
---|
352 | * Set the Start.stack field to the address of the stack |
---|
353 | * |
---|
354 | * NOTES: NONE |
---|
355 | * |
---|
356 | */ |
---|
357 | |
---|
358 | unsigned32 _Thread_Stack_Allocate( |
---|
359 | Thread_Control *the_thread, |
---|
360 | unsigned32 stack_size |
---|
361 | ); |
---|
362 | |
---|
363 | /* |
---|
364 | * _Thread_Stack_Free |
---|
365 | * |
---|
366 | * DESCRIPTION: |
---|
367 | * |
---|
368 | * Deallocate the Thread's stack. |
---|
369 | * NOTES: NONE |
---|
370 | * |
---|
371 | */ |
---|
372 | |
---|
373 | void _Thread_Stack_Free( |
---|
374 | Thread_Control *the_thread |
---|
375 | ); |
---|
376 | |
---|
377 | /* |
---|
378 | * _Thread_Initialize |
---|
379 | * |
---|
380 | * DESCRIPTION: |
---|
381 | * |
---|
382 | * XXX |
---|
383 | * |
---|
384 | * NOTES: |
---|
385 | * |
---|
386 | * If stack_area is NULL, it is allocated from the workspace. |
---|
387 | * |
---|
388 | * If the stack is allocated from the workspace, then it is guaranteed to be |
---|
389 | * of at least minimum size. |
---|
390 | */ |
---|
391 | |
---|
392 | boolean _Thread_Initialize( |
---|
393 | Objects_Information *information, |
---|
394 | Thread_Control *the_thread, |
---|
395 | void *stack_area, |
---|
396 | unsigned32 stack_size, |
---|
397 | boolean is_fp, |
---|
398 | Priority_Control priority, |
---|
399 | boolean is_preemptible, |
---|
400 | Thread_CPU_budget_algorithms budget_algorithm, |
---|
401 | Thread_CPU_budget_algorithm_callout budget_callout, |
---|
402 | unsigned32 isr_level, |
---|
403 | Objects_Name name |
---|
404 | ); |
---|
405 | |
---|
406 | /* |
---|
407 | * _Thread_Start |
---|
408 | * |
---|
409 | * DESCRIPTION: |
---|
410 | * |
---|
411 | * XXX |
---|
412 | */ |
---|
413 | |
---|
414 | boolean _Thread_Start( |
---|
415 | Thread_Control *the_thread, |
---|
416 | Thread_Start_types the_prototype, |
---|
417 | void *entry_point, |
---|
418 | void *pointer_argument, |
---|
419 | unsigned32 numeric_argument |
---|
420 | ); |
---|
421 | |
---|
422 | /* |
---|
423 | * _Thread_Restart |
---|
424 | * |
---|
425 | * DESCRIPTION: |
---|
426 | * |
---|
427 | * XXX |
---|
428 | */ |
---|
429 | |
---|
430 | /* XXX multiple task arg profiles */ |
---|
431 | |
---|
432 | boolean _Thread_Restart( |
---|
433 | Thread_Control *the_thread, |
---|
434 | void *pointer_argument, |
---|
435 | unsigned32 numeric_argument |
---|
436 | ); |
---|
437 | |
---|
438 | /* |
---|
439 | * _Thread_Close |
---|
440 | * |
---|
441 | * DESCRIPTION: |
---|
442 | * |
---|
443 | * XXX |
---|
444 | */ |
---|
445 | |
---|
446 | void _Thread_Close( |
---|
447 | Objects_Information *information, |
---|
448 | Thread_Control *the_thread |
---|
449 | ); |
---|
450 | |
---|
451 | /* |
---|
452 | * _Thread_Ready |
---|
453 | * |
---|
454 | * DESCRIPTION: |
---|
455 | * |
---|
456 | * This routine removes any set states for the_thread. It performs |
---|
457 | * any necessary scheduling operations including the selection of |
---|
458 | * a new heir thread. |
---|
459 | */ |
---|
460 | |
---|
461 | void _Thread_Ready( |
---|
462 | Thread_Control *the_thread |
---|
463 | ); |
---|
464 | |
---|
465 | /* |
---|
466 | * _Thread_Clear_state |
---|
467 | * |
---|
468 | * DESCRIPTION: |
---|
469 | * |
---|
470 | * This routine clears the indicated STATES for the_thread. It performs |
---|
471 | * any necessary scheduling operations including the selection of |
---|
472 | * a new heir thread. |
---|
473 | */ |
---|
474 | |
---|
475 | void _Thread_Clear_state( |
---|
476 | Thread_Control *the_thread, |
---|
477 | States_Control state |
---|
478 | ); |
---|
479 | |
---|
480 | /* |
---|
481 | * _Thread_Set_state |
---|
482 | * |
---|
483 | * DESCRIPTION: |
---|
484 | * |
---|
485 | * This routine sets the indicated states for the_thread. It performs |
---|
486 | * any necessary scheduling operations including the selection of |
---|
487 | * a new heir thread. |
---|
488 | * |
---|
489 | */ |
---|
490 | |
---|
491 | void _Thread_Set_state( |
---|
492 | Thread_Control *the_thread, |
---|
493 | States_Control state |
---|
494 | ); |
---|
495 | |
---|
496 | /* |
---|
497 | * _Thread_Set_transient |
---|
498 | * |
---|
499 | * DESCRIPTION: |
---|
500 | * |
---|
501 | * This routine sets the TRANSIENT state for the_thread. It performs |
---|
502 | * any necessary scheduling operations including the selection of |
---|
503 | * a new heir thread. |
---|
504 | */ |
---|
505 | |
---|
506 | void _Thread_Set_transient( |
---|
507 | Thread_Control *the_thread |
---|
508 | ); |
---|
509 | |
---|
510 | /* |
---|
511 | * _Thread_Reset_timeslice |
---|
512 | * |
---|
513 | * DESCRIPTION: |
---|
514 | * |
---|
515 | * This routine is invoked upon expiration of the currently |
---|
516 | * executing thread's timeslice. If no other thread's are ready |
---|
517 | * at the priority of the currently executing thread, then the |
---|
518 | * executing thread's timeslice is reset. Otherwise, the |
---|
519 | * currently executing thread is placed at the rear of the |
---|
520 | * FIFO for this priority and a new heir is selected. |
---|
521 | */ |
---|
522 | |
---|
523 | void _Thread_Reset_timeslice( void ); |
---|
524 | |
---|
525 | /* |
---|
526 | * _Thread_Tickle_timeslice |
---|
527 | * |
---|
528 | * DESCRIPTION: |
---|
529 | * |
---|
530 | * This routine is invoked as part of processing each clock tick. |
---|
531 | * It is responsible for determining if the current thread allows |
---|
532 | * timeslicing and, if so, when its timeslice expires. |
---|
533 | */ |
---|
534 | |
---|
535 | void _Thread_Tickle_timeslice( void ); |
---|
536 | |
---|
537 | /* |
---|
538 | * _Thread_Yield_processor |
---|
539 | * |
---|
540 | * DESCRIPTION: |
---|
541 | * |
---|
542 | * This routine is invoked when a thread wishes to voluntarily |
---|
543 | * transfer control of the processor to another thread of equal |
---|
544 | * or greater priority. |
---|
545 | */ |
---|
546 | |
---|
547 | void _Thread_Yield_processor( void ); |
---|
548 | |
---|
549 | /* |
---|
550 | * _Thread_Load_environment |
---|
551 | * |
---|
552 | * DESCRIPTION: |
---|
553 | * |
---|
554 | * This routine initializes the context of the_thread to its |
---|
555 | * appropriate starting state. |
---|
556 | */ |
---|
557 | |
---|
558 | void _Thread_Load_environment( |
---|
559 | Thread_Control *the_thread |
---|
560 | ); |
---|
561 | |
---|
562 | /* |
---|
563 | * _Thread_Handler |
---|
564 | * |
---|
565 | * DESCRIPTION: |
---|
566 | * |
---|
567 | * This routine is the wrapper function for all threads. It is |
---|
568 | * the starting point for all threads. The user provided thread |
---|
569 | * entry point is invoked by this routine. Operations |
---|
570 | * which must be performed immediately before and after the user's |
---|
571 | * thread executes are found here. |
---|
572 | */ |
---|
573 | |
---|
574 | void _Thread_Handler( void ); |
---|
575 | |
---|
576 | /* |
---|
577 | * _Thread_Delay_ended |
---|
578 | * |
---|
579 | * DESCRIPTION: |
---|
580 | * |
---|
581 | * This routine is invoked when a thread must be unblocked at the |
---|
582 | * end of a time based delay (i.e. wake after or wake when). |
---|
583 | */ |
---|
584 | |
---|
585 | void _Thread_Delay_ended( |
---|
586 | Objects_Id id, |
---|
587 | void *ignored |
---|
588 | ); |
---|
589 | |
---|
590 | /* |
---|
591 | * _Thread_Change_priority |
---|
592 | * |
---|
593 | * DESCRIPTION: |
---|
594 | * |
---|
595 | * This routine changes the current priority of the_thread to |
---|
596 | * new_priority. It performs any necessary scheduling operations |
---|
597 | * including the selection of a new heir thread. |
---|
598 | */ |
---|
599 | |
---|
600 | void _Thread_Change_priority ( |
---|
601 | Thread_Control *the_thread, |
---|
602 | Priority_Control new_priority, |
---|
603 | boolean prepend_it |
---|
604 | ); |
---|
605 | |
---|
606 | /* |
---|
607 | * _Thread_Set_priority |
---|
608 | * |
---|
609 | * DESCRIPTION: |
---|
610 | * |
---|
611 | * This routine updates the priority related fields in the_thread |
---|
612 | * control block to indicate the current priority is now new_priority. |
---|
613 | */ |
---|
614 | |
---|
615 | void _Thread_Set_priority( |
---|
616 | Thread_Control *the_thread, |
---|
617 | Priority_Control new_priority |
---|
618 | ); |
---|
619 | |
---|
620 | /* |
---|
621 | * _Thread_Evaluate_mode |
---|
622 | * |
---|
623 | * DESCRIPTION: |
---|
624 | * |
---|
625 | * This routine XXX |
---|
626 | */ |
---|
627 | |
---|
628 | boolean _Thread_Evaluate_mode( void ); |
---|
629 | |
---|
630 | /* |
---|
631 | * _Thread_Get |
---|
632 | * |
---|
633 | * NOTE: If we are not using static inlines, this must be a real |
---|
634 | * subroutine call. |
---|
635 | */ |
---|
636 | |
---|
637 | #ifndef USE_INLINES |
---|
638 | Thread_Control *_Thread_Get ( |
---|
639 | Objects_Id id, |
---|
640 | Objects_Locations *location |
---|
641 | ); |
---|
642 | #endif |
---|
643 | |
---|
644 | /* |
---|
645 | * _Thread_Idle_body |
---|
646 | * |
---|
647 | * DESCRIPTION: |
---|
648 | * |
---|
649 | * This routine is the body of the system idle thread. |
---|
650 | */ |
---|
651 | |
---|
652 | #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) |
---|
653 | Thread _Thread_Idle_body( |
---|
654 | unsigned32 ignored |
---|
655 | ); |
---|
656 | #endif |
---|
657 | |
---|
658 | #ifndef __RTEMS_APPLICATION__ |
---|
659 | #include <rtems/score/thread.inl> |
---|
660 | #endif |
---|
661 | #if defined(RTEMS_MULTIPROCESSING) |
---|
662 | #include <rtems/score/threadmp.h> |
---|
663 | #endif |
---|
664 | |
---|
665 | #ifdef __cplusplus |
---|
666 | } |
---|
667 | #endif |
---|
668 | |
---|
669 | #endif |
---|
670 | /* end of include file */ |
---|