From b5704446e6b8fa6318d8353cd4707d2d92a8031e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sun, 3 Jan 2016 00:11:44 -0500 Subject: [PATCH] WIP --- gc-notes.txt | 12 ++++++------ test.scm | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gc-notes.txt b/gc-notes.txt index 6649d245..b6b3de44 100644 --- a/gc-notes.txt +++ b/gc-notes.txt @@ -6,18 +6,18 @@ Phase 5 (gc-dev5) - Require pthreads library, stand cyclone back up using new GC Phase 6 (gc-dev6) - Multiple mutators (application threads) Phase 7 (TBD) - Sharing of variables between threads (ideally without limitation, but that might not be realistic) -TODO: -- create a branch and try to use CK atomics. - seems done, just keep an eye on this - -- multiple mutators, and threading functions/types. probably want this on a new branch, when ready - part of this is implementing the beginnings of srfi-18, to create multiple threads, sync them, etc - next steps: +Mutex TODO: - add mutex type, and associated functions from SRFI-18 when allocating a mutex, probably should do it on thread since by definition these are shared among multiple threads - may be able to free mutex using mutex_destroy from within gc_sweep. unfortunately it requires type checking each object before free, which is not ideal +TODO: +- multiple mutators, and threading functions/types. probably want this on a new branch, when ready + part of this is implementing the beginnings of srfi-18, to create multiple threads, sync them, etc + next steps: + - start making core stuff thread safe. for example, test.scm sometimes crashes, I think printing out result from (read) - assume I/O and eval both have threading issues diff --git a/test.scm b/test.scm index a7b84bd9..203994f1 100644 --- a/test.scm +++ b/test.scm @@ -11,6 +11,10 @@ ; (foo)) ;) +(define tmp2 (make-mutex)) +(mutex-lock! tmp2) +(mutex-unlock! tmp2) + ;; A program to prove if cooperation is working, or if it ;; is blocked by another thread. The (read) causes the main ;; thread to block. The collector should be notified prior