Last change
on this file since 6b5f22dc was
6b5f22dc,
checked in by Sebastian Huber <sebastian.huber@…>, on 11/26/20 at 10:45:47
|
rtems: Canonicalize Doxygen @file comments
Use common phrases for the file brief descriptions.
Update #3706.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup RTEMSImplClassicTask |
---|
5 | * |
---|
6 | * @brief This source file contains the implementation of |
---|
7 | * rtems_task_resume(). |
---|
8 | */ |
---|
9 | |
---|
10 | /* |
---|
11 | * COPYRIGHT (c) 1989-2014. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.org/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifdef HAVE_CONFIG_H |
---|
20 | #include "config.h" |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <rtems/rtems/tasksimpl.h> |
---|
24 | #include <rtems/score/threadimpl.h> |
---|
25 | |
---|
26 | rtems_status_code rtems_task_resume( |
---|
27 | rtems_id id |
---|
28 | ) |
---|
29 | { |
---|
30 | Thread_Control *the_thread; |
---|
31 | ISR_lock_Context lock_context; |
---|
32 | Per_CPU_Control *cpu_self; |
---|
33 | States_Control previous_state; |
---|
34 | |
---|
35 | the_thread = _Thread_Get( id, &lock_context ); |
---|
36 | |
---|
37 | if ( the_thread == NULL ) { |
---|
38 | #if defined(RTEMS_MULTIPROCESSING) |
---|
39 | return _RTEMS_tasks_MP_Resume( id ); |
---|
40 | #else |
---|
41 | return RTEMS_INVALID_ID; |
---|
42 | #endif |
---|
43 | } |
---|
44 | |
---|
45 | cpu_self = _Thread_Dispatch_disable_critical( &lock_context ); |
---|
46 | _ISR_lock_ISR_enable( &lock_context ); |
---|
47 | |
---|
48 | previous_state = _Thread_Clear_state( the_thread, STATES_SUSPENDED ); |
---|
49 | |
---|
50 | _Thread_Dispatch_enable( cpu_self ); |
---|
51 | return _States_Is_suspended( previous_state ) ? |
---|
52 | RTEMS_SUCCESSFUL : RTEMS_INCORRECT_STATE; |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.