4.115
Last change
on this file since f031df0e was
d5ef7ae2,
checked in by Sebastian Huber <sebastian.huber@…>, on 06/14/13 at 07:14:31
|
smp: Delete _SMP_Request_other_cores_to_dispatch()
Use an event triggered unicast to inform remote processors about a
necessary thread dispatch instead.
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Initialize, Disable, Enable, Flash, Enter, Exit ISR Implementation |
---|
5 | * @ingroup ScoreISR |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2011. |
---|
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.com/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/system.h> |
---|
22 | #include <rtems/score/isr.h> |
---|
23 | #include <rtems/score/thread.h> |
---|
24 | #include <rtems/score/threaddispatch.h> |
---|
25 | #include <rtems/score/smp.h> |
---|
26 | |
---|
27 | int _ISR_SMP_Enter(void) |
---|
28 | { |
---|
29 | uint32_t isr_nest_level; |
---|
30 | ISR_Level level; |
---|
31 | |
---|
32 | /* FIXME: Where is the corresponding _ISR_Enable()? */ |
---|
33 | _ISR_Disable( level ); |
---|
34 | |
---|
35 | isr_nest_level = _ISR_Nest_level++; |
---|
36 | |
---|
37 | _Thread_Disable_dispatch(); |
---|
38 | |
---|
39 | return isr_nest_level; |
---|
40 | } |
---|
41 | |
---|
42 | int _ISR_SMP_Exit(void) |
---|
43 | { |
---|
44 | ISR_Level level; |
---|
45 | int retval; |
---|
46 | |
---|
47 | retval = 0; |
---|
48 | |
---|
49 | _ISR_Disable( level ); |
---|
50 | |
---|
51 | _ISR_Nest_level--; |
---|
52 | |
---|
53 | if ( _ISR_Nest_level == 0 ) { |
---|
54 | if ( _Thread_Dispatch_necessary ) { |
---|
55 | if ( _Thread_Dispatch_get_disable_level() == 1 ) { |
---|
56 | retval = 1; |
---|
57 | } |
---|
58 | } |
---|
59 | } |
---|
60 | |
---|
61 | /* |
---|
62 | * SPARC has special support to avoid some nasty recursive type behaviour. |
---|
63 | * When dispatching in a thread and we want to return to it then it needs |
---|
64 | * to finish. |
---|
65 | */ |
---|
66 | #if defined(__sparc__) |
---|
67 | if ( _CPU_ISR_Dispatch_disable ) |
---|
68 | retval = 0; |
---|
69 | #endif |
---|
70 | |
---|
71 | _ISR_Enable( level ); |
---|
72 | |
---|
73 | _Thread_Dispatch_decrement_disable_level(); |
---|
74 | |
---|
75 | return retval; |
---|
76 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.