@@ -19,7 +19,7 @@ use crate::util::alloc::allocators::AllocatorSelector;
19
19
use crate :: util:: constants:: LOG_BYTES_IN_PAGE ;
20
20
use crate :: util:: heap:: layout:: vm_layout_constants:: HEAP_END ;
21
21
use crate :: util:: heap:: layout:: vm_layout_constants:: HEAP_START ;
22
- use crate :: util:: OpaquePointer ;
22
+ use crate :: util:: opaque_pointer :: * ;
23
23
use crate :: util:: { Address , ObjectReference } ;
24
24
use crate :: vm:: Collection ;
25
25
use crate :: vm:: VMBinding ;
@@ -30,7 +30,7 @@ use std::sync::atomic::Ordering;
30
30
/// Arguments:
31
31
/// * `mmtk`: A reference to an MMTk instance.
32
32
/// * `tls`: The thread that will be used as the GC controller.
33
- pub fn start_control_collector < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : OpaquePointer ) {
33
+ pub fn start_control_collector < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : VMWorkerThread ) {
34
34
mmtk. plan . base ( ) . control_collector_context . run ( tls) ;
35
35
}
36
36
@@ -61,7 +61,7 @@ pub fn gc_init<VM: VMBinding>(mmtk: &'static mut MMTK<VM>, heap_size: usize) {
61
61
/// * `tls`: The thread that will be associated with the mutator.
62
62
pub fn bind_mutator < VM : VMBinding > (
63
63
mmtk : & ' static MMTK < VM > ,
64
- tls : OpaquePointer ,
64
+ tls : VMMutatorThread ,
65
65
) -> Box < Mutator < VM > > {
66
66
crate :: plan:: global:: create_mutator ( tls, mmtk)
67
67
}
@@ -148,7 +148,7 @@ pub fn get_allocator_mapping<VM: VMBinding>(
148
148
/// * `worker`: A reference to the GC worker.
149
149
/// * `mmtk`: A reference to an MMTk instance.
150
150
pub fn start_worker < VM : VMBinding > (
151
- tls : OpaquePointer ,
151
+ tls : VMWorkerThread ,
152
152
worker : & mut GCWorker < VM > ,
153
153
mmtk : & ' static MMTK < VM > ,
154
154
) {
@@ -165,7 +165,7 @@ pub fn start_worker<VM: VMBinding>(
165
165
/// * `mmtk`: A reference to an MMTk instance.
166
166
/// * `tls`: The thread that wants to enable the collection. This value will be passed back to the VM in
167
167
/// Collection::spawn_worker_thread() so that the VM knows the context.
168
- pub fn enable_collection < VM : VMBinding > ( mmtk : & ' static MMTK < VM > , tls : OpaquePointer ) {
168
+ pub fn enable_collection < VM : VMBinding > ( mmtk : & ' static MMTK < VM > , tls : VMThread ) {
169
169
mmtk. scheduler . initialize ( mmtk. options . threads , mmtk, tls) ;
170
170
VM :: VMCollection :: spawn_worker_thread ( tls, None ) ; // spawn controller thread
171
171
mmtk. plan . base ( ) . initialized . store ( true , Ordering :: SeqCst ) ;
@@ -228,7 +228,7 @@ pub fn total_bytes<VM: VMBinding>(mmtk: &MMTK<VM>) -> usize {
228
228
/// Arguments:
229
229
/// * `mmtk`: A reference to an MMTk instance.
230
230
/// * `tls`: The thread that triggers this collection request.
231
- pub fn handle_user_collection_request < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : OpaquePointer ) {
231
+ pub fn handle_user_collection_request < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : VMMutatorThread ) {
232
232
mmtk. plan . handle_user_collection_request ( tls, false ) ;
233
233
}
234
234
@@ -326,7 +326,7 @@ pub fn add_phantom_candidate<VM: VMBinding>(
326
326
/// Arguments:
327
327
/// * `mmtk`: A reference to an MMTk instance.
328
328
/// * `tls`: The thread that calls the function (and triggers a collection).
329
- pub fn harness_begin < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : OpaquePointer ) {
329
+ pub fn harness_begin < VM : VMBinding > ( mmtk : & MMTK < VM > , tls : VMMutatorThread ) {
330
330
mmtk. harness_begin ( tls) ;
331
331
}
332
332
0 commit comments