Changeset d50acdbb in rtems for cpukit/sapi
- Timestamp:
- 03/10/14 07:25:32 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 28779c7
- Parents:
- ae88aa7
- git-author:
- Sebastian Huber <sebastian.huber@…> (03/10/14 07:25:32)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (03/11/14 09:58:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/sapi/src/chainsmp.c
rae88aa7 rd50acdbb 25 25 static SMP_lock_Control chain_lock = SMP_LOCK_INITIALIZER; 26 26 27 static void chain_acquire( ISR_Level *level)27 static void chain_acquire( SMP_lock_Context *lock_context ) 28 28 { 29 _SMP_lock_ISR_disable_and_acquire( &chain_lock, *level);29 _SMP_lock_ISR_disable_and_acquire( &chain_lock, lock_context ); 30 30 } 31 31 32 static void chain_release( ISR_Level *level)32 static void chain_release( SMP_lock_Context *lock_context ) 33 33 { 34 _SMP_lock_Release_and_ISR_enable( &chain_lock, *level);34 _SMP_lock_Release_and_ISR_enable( &chain_lock, lock_context ); 35 35 } 36 36 37 37 void rtems_chain_extract( rtems_chain_node *node ) 38 38 { 39 ISR_Level level;39 SMP_lock_Context lock_context; 40 40 41 chain_acquire( &l evel);41 chain_acquire( &lock_context ); 42 42 _Chain_Extract_unprotected( node ); 43 chain_release( &l evel);43 chain_release( &lock_context ); 44 44 } 45 45 … … 47 47 { 48 48 rtems_chain_node *node; 49 ISR_Level level;49 SMP_lock_Context lock_context; 50 50 51 chain_acquire( &l evel);51 chain_acquire( &lock_context ); 52 52 node = _Chain_Get_unprotected( chain ); 53 chain_release( &l evel);53 chain_release( &lock_context ); 54 54 55 55 return node; … … 58 58 void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node ) 59 59 { 60 ISR_Level level;60 SMP_lock_Context lock_context; 61 61 62 chain_acquire( &l evel);62 chain_acquire( &lock_context ); 63 63 _Chain_Insert_unprotected( after_node, node ); 64 chain_release( &l evel);64 chain_release( &lock_context ); 65 65 } 66 66 … … 70 70 ) 71 71 { 72 ISR_Level level;72 SMP_lock_Context lock_context; 73 73 74 chain_acquire( &l evel);74 chain_acquire( &lock_context ); 75 75 _Chain_Append_unprotected( chain, node ); 76 chain_release( &l evel);76 chain_release( &lock_context ); 77 77 } 78 78 … … 82 82 ) 83 83 { 84 ISR_Level level;84 SMP_lock_Context lock_context; 85 85 86 chain_acquire( &l evel);86 chain_acquire( &lock_context ); 87 87 _Chain_Prepend_unprotected( chain, node ); 88 chain_release( &l evel);88 chain_release( &lock_context ); 89 89 } 90 90 … … 95 95 { 96 96 bool was_empty; 97 ISR_Level level;97 SMP_lock_Context lock_context; 98 98 99 chain_acquire( &l evel);99 chain_acquire( &lock_context ); 100 100 was_empty = _Chain_Append_with_empty_check_unprotected( chain, node ); 101 chain_release( &l evel);101 chain_release( &lock_context ); 102 102 103 103 return was_empty; … … 110 110 { 111 111 bool was_empty; 112 ISR_Level level;112 SMP_lock_Context lock_context; 113 113 114 chain_acquire( &l evel);114 chain_acquire( &lock_context ); 115 115 was_empty = _Chain_Prepend_with_empty_check_unprotected( chain, node ); 116 chain_release( &l evel);116 chain_release( &lock_context ); 117 117 118 118 return was_empty; … … 125 125 { 126 126 bool is_empty_now; 127 ISR_Level level;127 SMP_lock_Context lock_context; 128 128 129 chain_acquire( &l evel);129 chain_acquire( &lock_context ); 130 130 is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); 131 chain_release( &l evel);131 chain_release( &lock_context ); 132 132 133 133 return is_empty_now;
Note: See TracChangeset
for help on using the changeset viewer.