Changeset 33d0666 in rtems
- Timestamp:
- 04/15/14 14:20:17 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 2e06be4
- Parents:
- b80f920
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/15/14 14:20:17)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/16/14 07:07:33)
- Location:
- cpukit/score
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/include/rtems/score/cpustdatomic.h
rb80f920 r33d0666 55 55 56 56 /** 57 * @brief the enumeration Atomic_Memory_barrier specifies the detailed regular 58 * memory synchronization operations used in the atomic operation API 59 * definitions. 57 * @brief Memory order according to ISO/IEC 9899:2011. 60 58 */ 61 59 typedef enum { 62 /** no operation orders memory. */63 60 ATOMIC_ORDER_RELAXED = memory_order_relaxed, 64 /** a load operation performs an acquire operation on the affected memory65 * location. This flag guarantees that the effects of load operation are66 * completed before the effects of any later data accesses.67 */68 61 ATOMIC_ORDER_ACQUIRE = memory_order_acquire, 69 /** a store operation performs a release operation on the affected memory 70 * location. This flag guarantee that all effects of all previous data 71 * accesses are completed before the store operation takes place. 72 */ 73 ATOMIC_ORDER_RELEASE = memory_order_release 62 ATOMIC_ORDER_RELEASE = memory_order_release, 63 ATOMIC_ORDER_SEQ_CST = memory_order_seq_cst 74 64 } Atomic_Order; 75 65 -
cpukit/score/include/rtems/score/schedulersmpimpl.h
rb80f920 r33d0666 93 93 _Thread_Set_CPU( heir, cpu_of_victim ); 94 94 95 cpu_of_victim->heir = heir; 96 95 97 /* 96 * FIXME: Here we need atomic store operations with a relaxed memory order. 97 * The _CPU_SMP_Send_interrupt() will ensure that the change can be 98 * observed consistently. 98 * It is critical that we first update the heir and then the dispatch 99 * necessary so that _Thread_Dispatch() cannot miss an update. 99 100 */ 100 cpu_of_victim->heir = heir; 101 _Atomic_Fence( ATOMIC_ORDER_RELEASE ); 102 101 103 cpu_of_victim->dispatch_necessary = true; 102 104 -
cpukit/score/src/threaddispatch.c
rb80f920 r33d0666 98 98 while ( per_cpu->dispatch_necessary ) { 99 99 #endif 100 per_cpu->dispatch_necessary = false; 101 102 #if defined( RTEMS_SMP ) 103 /* 104 * It is critical that we first update the dispatch necessary and then the 105 * read the heir so that we don't miss an update by 106 * _Scheduler_SMP_Allocate_processor(). 107 */ 108 _Atomic_Fence( ATOMIC_ORDER_SEQ_CST ); 109 #endif 110 100 111 heir = per_cpu->heir; 101 per_cpu->dispatch_necessary = false;102 112 per_cpu->executing = heir; 113 103 114 #if defined( RTEMS_SMP ) 104 115 executing->is_executing = false;
Note: See TracChangeset
for help on using the changeset viewer.