4.115
Last change
on this file since 217b3f53 was
217b3f53,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/14/15 at 16:04:25
|
Disable deprecated warning on implementation of deprecated methods
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief RTEMS Tasks Invoke Task Variable Destructor |
---|
5 | * @ingroup ClassicTasks |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2014. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #if !defined(RTEMS_SMP) |
---|
22 | #include <rtems/rtems/tasksimpl.h> |
---|
23 | #include <rtems/score/threadimpl.h> |
---|
24 | #include <rtems/score/wkspace.h> |
---|
25 | |
---|
26 | /* |
---|
27 | * We know this is deprecated and don't want a warning on every BSP built. |
---|
28 | */ |
---|
29 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
---|
30 | |
---|
31 | void _RTEMS_Tasks_Invoke_task_variable_dtor( |
---|
32 | Thread_Control *the_thread, |
---|
33 | rtems_task_variable_t *tvp |
---|
34 | ) |
---|
35 | { |
---|
36 | void (*dtor)(void *); |
---|
37 | void *value; |
---|
38 | |
---|
39 | dtor = tvp->dtor; |
---|
40 | if (_Thread_Get_executing() == the_thread) { |
---|
41 | value = *tvp->ptr; |
---|
42 | *tvp->ptr = tvp->gval; |
---|
43 | } else { |
---|
44 | value = tvp->tval; |
---|
45 | } |
---|
46 | |
---|
47 | if ( dtor ) |
---|
48 | (*dtor)(value); |
---|
49 | |
---|
50 | _Workspace_Free(tvp); |
---|
51 | } |
---|
52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.