/// Increment generation counter in a HEADER block for locking/unlocking
Increment generation counter in a HEADER block for locking/unlocking
Increment generation counter in a HEADER block for locking / unlocking
fn increment_generation_count(&self) {
        let mut payload = self.read_payload();
        let value = payload.header_generation_count();
        let new_value = if value == u64::max_value() { 0 } else { value + 1 };
        payload.set_header_generation_count(new_value);
        if new_value % 2 != 0 {
            fence(Ordering::Acquire);
        }
        self.write_payload(payload);
        if new_value % 2 == 0 {
            fence(Ordering::Release);
        }
    }
fn increment_generation_count ( & self ) { let mut payload = self . read_payload ( ) ; let value = payload . header_generation_count ( ) ; let new_value = if value == u64 :: max_value ( ) { 0 } else { value + 1 } ; payload . set_header_generation_count ( new_value ) ; if new_value % 2 != 0 { fence ( Ordering :: Acquire ) ; } self . write_payload ( payload ) ; if new_value % 2 == 0 { fence ( Ordering :: Release ) ; } }
Increment generation counter in a HEADER block for locking/unlocking
Increment generation counter in a HEADER block for locking / unlocking
&self