equal
deleted
inserted
replaced
137 return Atomic::load(&_messages) == 0; |
137 return Atomic::load(&_messages) == 0; |
138 } |
138 } |
139 |
139 |
140 int JfrPostBox::collect() { |
140 int JfrPostBox::collect() { |
141 // get pending and reset to 0 |
141 // get pending and reset to 0 |
142 const int messages = Atomic::xchg(0, &_messages); |
142 const int messages = Atomic::xchg(&_messages, 0); |
143 if (check_waiters(messages)) { |
143 if (check_waiters(messages)) { |
144 _has_waiters = true; |
144 _has_waiters = true; |
145 assert(JfrMsg_lock->owned_by_self(), "incrementing _msg_read_serial is protected by JfrMsg_lock"); |
145 assert(JfrMsg_lock->owned_by_self(), "incrementing _msg_read_serial is protected by JfrMsg_lock"); |
146 // Update made visible on release of JfrMsg_lock via fence instruction in Monitor::IUnlock. |
146 // Update made visible on release of JfrMsg_lock via fence instruction in Monitor::IUnlock. |
147 ++_msg_read_serial; |
147 ++_msg_read_serial; |