comparison src/share/vm/gc_implementation/g1/ptrQueue.cpp @ 14309:63a4eb8bcd23

8025856: Fix typos in the GC code Summary: Fix about 440 typos in comments in the VM code Reviewed-by: mgerdin, tschatzl, coleenp, kmo, jcoomes
author jwilhelm
date Thu, 23 Jan 2014 14:47:23 +0100
parents de6a9e811145
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14308:870aedf4ba4f 14309:63a4eb8bcd23
69 69
70 void PtrQueue::locking_enqueue_completed_buffer(void** buf) { 70 void PtrQueue::locking_enqueue_completed_buffer(void** buf) {
71 assert(_lock->owned_by_self(), "Required."); 71 assert(_lock->owned_by_self(), "Required.");
72 72
73 // We have to unlock _lock (which may be Shared_DirtyCardQ_lock) before 73 // We have to unlock _lock (which may be Shared_DirtyCardQ_lock) before
74 // we acquire DirtyCardQ_CBL_mon inside enqeue_complete_buffer as they 74 // we acquire DirtyCardQ_CBL_mon inside enqueue_complete_buffer as they
75 // have the same rank and we may get the "possible deadlock" message 75 // have the same rank and we may get the "possible deadlock" message
76 _lock->unlock(); 76 _lock->unlock();
77 77
78 qset()->enqueue_complete_buffer(buf); 78 qset()->enqueue_complete_buffer(buf);
79 // We must relock only because the caller will unlock, for the normal 79 // We must relock only because the caller will unlock, for the normal
149 if (_lock) { 149 if (_lock) {
150 assert(_lock->owned_by_self(), "Required."); 150 assert(_lock->owned_by_self(), "Required.");
151 151
152 // The current PtrQ may be the shared dirty card queue and 152 // The current PtrQ may be the shared dirty card queue and
153 // may be being manipulated by more than one worker thread 153 // may be being manipulated by more than one worker thread
154 // during a pause. Since the enqueuing of the completed 154 // during a pause. Since the enqueueing of the completed
155 // buffer unlocks the Shared_DirtyCardQ_lock more than one 155 // buffer unlocks the Shared_DirtyCardQ_lock more than one
156 // worker thread can 'race' on reading the shared queue attributes 156 // worker thread can 'race' on reading the shared queue attributes
157 // (_buf and _index) and multiple threads can call into this 157 // (_buf and _index) and multiple threads can call into this
158 // routine for the same buffer. This will cause the completed 158 // routine for the same buffer. This will cause the completed
159 // buffer to be added to the CBL multiple times. 159 // buffer to be added to the CBL multiple times.
168 void** buf = _buf; // local pointer to completed buffer 168 void** buf = _buf; // local pointer to completed buffer
169 _buf = NULL; // clear shared _buf field 169 _buf = NULL; // clear shared _buf field
170 170
171 locking_enqueue_completed_buffer(buf); // enqueue completed buffer 171 locking_enqueue_completed_buffer(buf); // enqueue completed buffer
172 172
173 // While the current thread was enqueuing the buffer another thread 173 // While the current thread was enqueueing the buffer another thread
174 // may have a allocated a new buffer and inserted it into this pointer 174 // may have a allocated a new buffer and inserted it into this pointer
175 // queue. If that happens then we just return so that the current 175 // queue. If that happens then we just return so that the current
176 // thread doesn't overwrite the buffer allocated by the other thread 176 // thread doesn't overwrite the buffer allocated by the other thread
177 // and potentially losing some dirtied cards. 177 // and potentially losing some dirtied cards.
178 178