1 | /* |
---|
2 | * Thread Handler |
---|
3 | * |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1999. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems/system.h> |
---|
16 | #include <rtems/score/apiext.h> |
---|
17 | #include <rtems/score/context.h> |
---|
18 | #include <rtems/score/interr.h> |
---|
19 | #include <rtems/score/isr.h> |
---|
20 | #include <rtems/score/object.h> |
---|
21 | #include <rtems/score/priority.h> |
---|
22 | #include <rtems/score/states.h> |
---|
23 | #include <rtems/score/sysstate.h> |
---|
24 | #include <rtems/score/thread.h> |
---|
25 | #include <rtems/score/threadq.h> |
---|
26 | #include <rtems/score/userext.h> |
---|
27 | #include <rtems/score/wkspace.h> |
---|
28 | |
---|
29 | /*PAGE |
---|
30 | * |
---|
31 | * _Thread_Delay_ended |
---|
32 | * |
---|
33 | * This routine processes a thread whose delay period has ended. |
---|
34 | * It is called by the watchdog handler. |
---|
35 | * |
---|
36 | * Input parameters: |
---|
37 | * id - thread id |
---|
38 | * |
---|
39 | * Output parameters: NONE |
---|
40 | */ |
---|
41 | |
---|
42 | void _Thread_Delay_ended( |
---|
43 | Objects_Id id, |
---|
44 | void *ignored |
---|
45 | ) |
---|
46 | { |
---|
47 | Thread_Control *the_thread; |
---|
48 | Objects_Locations location; |
---|
49 | |
---|
50 | the_thread = _Thread_Get( id, &location ); |
---|
51 | switch ( location ) { |
---|
52 | case OBJECTS_ERROR: |
---|
53 | case OBJECTS_REMOTE: /* impossible */ |
---|
54 | break; |
---|
55 | case OBJECTS_LOCAL: |
---|
56 | _Thread_Unblock( the_thread ); |
---|
57 | _Thread_Unnest_dispatch(); |
---|
58 | break; |
---|
59 | } |
---|
60 | } |
---|