4.104.114.84.95
Last change
on this file since 2979c28 was
2979c28,
checked in by Joel Sherrill <joel.sherrill@…>, on 11/12/99 at 21:21:09
|
+ Changed validation of the_thread to validation of location.
+ Removed error path that should never happen.
|
-
Property mode set to
100644
|
File size:
1.5 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 | * sta_tsk - Start Task |
---|
22 | */ |
---|
23 | |
---|
24 | ER sta_tsk( |
---|
25 | ID tskid, |
---|
26 | INT stacd |
---|
27 | ) |
---|
28 | { |
---|
29 | register Thread_Control *the_thread; |
---|
30 | Objects_Locations location; |
---|
31 | boolean status; |
---|
32 | |
---|
33 | the_thread = _ITRON_Task_Get( tskid, &location ); |
---|
34 | switch ( location ) { |
---|
35 | case OBJECTS_REMOTE: |
---|
36 | case OBJECTS_ERROR: |
---|
37 | _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); |
---|
38 | |
---|
39 | case OBJECTS_LOCAL: |
---|
40 | |
---|
41 | if ( !_States_Is_dormant( the_thread->current_state ) ) |
---|
42 | _ITRON_return_errorno( E_OBJ ); |
---|
43 | |
---|
44 | status = _Thread_Start( |
---|
45 | the_thread, |
---|
46 | THREAD_START_NUMERIC, /* XXX should be able to say we have no arg */ |
---|
47 | the_thread->Start.entry_point, |
---|
48 | 0, /* XXX supercore forces us to have an arg */ |
---|
49 | 0 /* unused */ |
---|
50 | ); |
---|
51 | |
---|
52 | /* |
---|
53 | * This error can not happen entry_point is checked in create. |
---|
54 | if ( !status ) |
---|
55 | _ITRON_return_errorno( E_OBJ ); |
---|
56 | */ |
---|
57 | |
---|
58 | _ITRON_return_errorno( E_OK ); |
---|
59 | } |
---|
60 | |
---|
61 | _ITRON_return_errorno( E_OBJ ); /* unreached - only to remove warnings */ |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | |
---|
Note: See
TracBrowser
for help on using the repository browser.