Changeset 626ace4 in rtems
- Timestamp:
- 10/15/04 21:05:07 (19 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- be216b3
- Parents:
- ba1a188c
- Location:
- cpukit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
rba1a188c r626ace4 1 2004-10-15 Joel Sherrill <joel@OARcorp.com> 2 3 PR 692/rtems 4 * rtems/src/regiongetsegment.c, rtems/src/regionreturnsegment.c: The 5 Region Manager did not follow the proper protocol when blocking and 6 unblocking tasks waiting on buffers. This was a bug introduced with 7 the transition to an Allocation Mutex. 8 1 9 2004-09-29 Joel Sherrill <joel@OARcorp.com> 2 10 -
cpukit/rtems/src/regiongetsegment.c
rba1a188c r626ace4 99 99 } 100 100 101 /* 102 * Switch from using the memory allocation mutex to using a 103 * dispatching disabled critical section. We have to do this 104 * because this thread is going to block. 105 */ 106 _Thread_Disable_dispatch(); 107 _RTEMS_Unlock_allocator(); 108 101 109 executing->Wait.queue = &the_region->Wait_queue; 102 110 executing->Wait.id = id; … … 108 116 _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 109 117 110 _RTEMS_Unlock_allocator(); 118 _Thread_Enable_dispatch(); 119 111 120 return (rtems_status_code) executing->Wait.return_code; 112 121 } -
cpukit/rtems/src/regionreturnsegment.c
rba1a188c r626ace4 95 95 96 96 the_region->number_of_used_blocks -= 1; 97 98 /* 99 * Switch from using the memory allocation mutex to using a 100 * dispatching disabled critical section. We have to do this 101 * because this thread may unblock one or more threads that were 102 * waiting on memory. 103 * 104 * NOTE: The following loop is O(n) where n is the number of 105 * threads whose memory request is satisfied. 106 */ 107 _RTEMS_Unlock_allocator(); 108 _Thread_Disable_dispatch(); 109 97 110 for ( ; ; ) { 98 111 the_thread = _Thread_queue_First( &the_region->Wait_queue ); … … 114 127 the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 115 128 } 129 _Thread_Enable_dispatch(); 116 130 117 _RTEMS_Unlock_allocator();118 131 return RTEMS_SUCCESSFUL; 119 132 }
Note: See TracChangeset
for help on using the changeset viewer.