pub trait BarrierSemantics: 'static + Send {
    type VM: VMBinding;

    const UNLOG_BIT_SPEC: MetadataSpec = _;

    // Required methods
    fn flush(&mut self);
    fn object_reference_write_slow(
        &mut self,
        src: ObjectReference,
        slot: <Self::VM as VMBinding>::VMSlot,
        target: Option<ObjectReference>
    );
    fn memory_region_copy_slow(
        &mut self,
        src: <Self::VM as VMBinding>::VMMemorySlice,
        dst: <Self::VM as VMBinding>::VMMemorySlice
    );

    // Provided method
    fn object_probable_write_slow(&mut self, _obj: ObjectReference) { ... }
}
Expand description

A barrier semantics defines the barrier slow-path behaviour. For example, how an object barrier processes it’s modbufs. Specifically, it defines the slow-path call interfaces and a call to flush buffers.

A barrier is a combination of fast-path behaviour + slow-path semantics. The fast-path code will decide whether to call the slow-path calls.

Required Associated Types§

Provided Associated Constants§

Required Methods§

source

fn flush(&mut self)

Flush thread-local buffers or remembered sets. Normally this is called by the slow-path implementation whenever the thread-local buffers are full. This will also be called externally by the VM, when the thread is being destroyed.

source

fn object_reference_write_slow( &mut self, src: ObjectReference, slot: <Self::VM as VMBinding>::VMSlot, target: Option<ObjectReference> )

Slow-path call for object field write operations.

source

fn memory_region_copy_slow( &mut self, src: <Self::VM as VMBinding>::VMMemorySlice, dst: <Self::VM as VMBinding>::VMMemorySlice )

Slow-path call for mempry slice copy operations. For example, array-copy operations.

Provided Methods§

source

fn object_probable_write_slow(&mut self, _obj: ObjectReference)

Object will probably be modified

Object Safety§

This trait is not object safe.

Implementors§