4.104.114.84.95
Last change
on this file since eb02f47 was
eb02f47,
checked in by Joel Sherrill <joel.sherrill@…>, on 11/10/99 at 13:48:27
|
Committed modifications from ITRON Task and Task Dependendent Synchronization
Working Group. Included are tests.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in the file LICENSE in this distribution or at |
---|
4 | * http://www.OARcorp.com/rtems/license.html. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #include <itron.h> |
---|
10 | |
---|
11 | #include <rtems/score/thread.h> |
---|
12 | #include <rtems/score/userext.h> |
---|
13 | #include <rtems/score/wkspace.h> |
---|
14 | #include <rtems/score/apiext.h> |
---|
15 | #include <rtems/score/sysstate.h> |
---|
16 | |
---|
17 | #include <rtems/itron/task.h> |
---|
18 | |
---|
19 | |
---|
20 | /* |
---|
21 | * frsm_tsk - Forcibly Resume Suspended Task |
---|
22 | */ |
---|
23 | |
---|
24 | ER frsm_tsk( |
---|
25 | ID tskid |
---|
26 | ) |
---|
27 | { |
---|
28 | register Thread_Control *the_thread; |
---|
29 | Objects_Locations location; |
---|
30 | |
---|
31 | the_thread = _ITRON_Task_Get( tskid, &location ); |
---|
32 | if (!the_thread) |
---|
33 | _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); |
---|
34 | |
---|
35 | if ( the_thread == _Thread_Executing ) |
---|
36 | _ITRON_return_errorno( E_OBJ ); |
---|
37 | |
---|
38 | if (_States_Is_dormant( the_thread->current_state )) |
---|
39 | _ITRON_return_errorno( E_OBJ ); |
---|
40 | |
---|
41 | switch ( location ) { |
---|
42 | case OBJECTS_REMOTE: |
---|
43 | case OBJECTS_ERROR: |
---|
44 | _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); |
---|
45 | |
---|
46 | case OBJECTS_LOCAL: |
---|
47 | _Thread_Resume( the_thread, TRUE ); |
---|
48 | _Thread_Enable_dispatch(); |
---|
49 | return E_OK; |
---|
50 | } |
---|
51 | |
---|
52 | return E_OBJ; /* XXX - Should never get here */ |
---|
53 | |
---|
54 | } |
---|
55 | |
---|
56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.