1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | #if HAVE_CONFIG_H1 |
19 | #include "config.h" |
20 | #endif |
21 | |
22 | #include <rtems/system.h> |
23 | #include <rtems/score/isr.h> |
24 | #include <rtems/score/corebarrier.h> |
25 | #include <rtems/score/states.h> |
26 | #include <rtems/score/thread.h> |
27 | #include <rtems/score/threadq.h> |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | uint32_t _CORE_barrier_Release( |
47 | CORE_barrier_Control *the_barrier, |
48 | #if defined(RTEMS_MULTIPROCESSING) |
49 | Objects_Id id, |
50 | CORE_barrier_API_mp_support_callout api_barrier_mp_support |
51 | #else |
52 | Objects_Id id __attribute__((unused)), |
53 | CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) |
54 | #endif |
55 | ) |
56 | { |
57 | Thread_Control *the_thread; |
58 | uint32_t count; |
59 | |
60 | count = 0; |
61 | while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { |
| Although the value stored to 'the_thread' is used in the enclosing expression, the value is never actually read from 'the_thread' |
62 | #if defined(RTEMS_MULTIPROCESSING) |
63 | if ( !_Objects_Is_local_id( the_thread->Object.id ) ) |
64 | (*api_barrier_mp_support) ( the_thread, id ); |
65 | #endif |
66 | count++; |
67 | } |
68 | the_barrier->number_of_waiting_threads = 0; |
69 | return count; |
70 | } |