typedef struct gc_thread_ {
#ifdef THREADED_RTS
OSThreadId id; // The OS thread that this struct belongs to
+ Mutex wake_mutex;
+ Condition wake_cond; // So we can go to sleep between GCs
+ rtsBool wakeup;
+ rtsBool exit;
#endif
nat thread_index; // a zero based index identifying the thread
// --------------------
// evacuate flags
- nat evac_gen; // Youngest generation that objects
+ step *evac_step; // Youngest generation that objects
// should be evacuated to in
// evacuate(). (Logically an
// argument to evacuate, but it's
extern rtsBool major_gc;
extern gc_thread *gc_threads;
-extern gc_thread *gct; // this thread's gct TODO: make thread-local
+register gc_thread *gct __asm__("%rbx");
+// extern gc_thread *gct; // this thread's gct TODO: make thread-local
extern StgClosure* static_objects;
extern StgClosure* scavenged_static_objects;
extern long copied;
extern long scavd_copied;
+#ifdef THREADED_RTS
+extern SpinLock static_objects_sync;
+#endif
+
#ifdef DEBUG
extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS;
#endif