4.115
Last change
on this file since f068384e was
f068384e,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/24/13 at 10:03:31
|
score: Create schedulerpriority impl header
Move implementation specific parts of schedulerpriority.h and
schedulerpriority.inl into new header file schedulerpriorityimpl.h. The
schedulerpriority.h contains now only the application visible API.
Add missing includes. Remove superfluous includes.
Move declaration of _Priority_Bit_map to prioritybitmap.inl since this
variable is used only here.
Remove second declaration of _Priority_Major_bit_map.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Scheduler CBS Destroy Server |
---|
5 | * |
---|
6 | * @ingroup ScoreScheduler |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (C) 2011 Petr Benes. |
---|
11 | * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.com/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/score/schedulercbs.h> |
---|
23 | #include <rtems/score/wkspace.h> |
---|
24 | |
---|
25 | int _Scheduler_CBS_Destroy_server ( |
---|
26 | Scheduler_CBS_Server_id server_id |
---|
27 | ) |
---|
28 | { |
---|
29 | int ret = SCHEDULER_CBS_OK; |
---|
30 | rtems_id tid; |
---|
31 | |
---|
32 | if ( server_id >= _Scheduler_CBS_Maximum_servers ) |
---|
33 | return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; |
---|
34 | |
---|
35 | if ( !_Scheduler_CBS_Server_list[server_id] ) |
---|
36 | return SCHEDULER_CBS_ERROR_NOSERVER; |
---|
37 | |
---|
38 | if ( (tid = _Scheduler_CBS_Server_list[server_id]->task_id) != -1 ) |
---|
39 | ret = _Scheduler_CBS_Detach_thread ( server_id, tid ); |
---|
40 | |
---|
41 | _Workspace_Free( _Scheduler_CBS_Server_list[server_id] ); |
---|
42 | _Scheduler_CBS_Server_list[server_id] = NULL; |
---|
43 | return ret; |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.