[MLton] cvs commit: critical sections during thread switch
Matthew Fluet
fluet@cs.cornell.edu
Sun, 4 Apr 2004 22:02:59 -0400 (EDT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-959030623-1081130579=:25682
Content-Type: TEXT/PLAIN; charset=US-ASCII
Here's a revised gc.c. It seems to pass the regressions (with the slow
GC_switchToThread), but I don't want to check it in without someone else
taking a look at it.
Essentially, here's what changed:
switchToThread(GC_state s, GC_thread t)
- never invokes a GC, it just modifies s->currentThread;
it's up to the caller to (indirectly) invoke doGC.
I moved the send of a GC signal to doGC, which seems where it really
belongs.
mutatorFrontierInvariant, mutatorStackInvariant, and
ensureMutatorInvariant work together to check that enough frontier and
stack are available for the current thread, possibly invoking a GC if
necessary.
My big question is whether or not the stack resizing in forward is correct
given the new invariants.
---559023410-959030623-1081130579=:25682
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="gc.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.44.0404042202590.25682@snoball.cs.cornell.edu>
Content-Description:
Content-Disposition: attachment; filename="gc.c"
LyogQ29weXJpZ2h0IChDKSAxOTk5LTIwMDQgSGVucnkgQ2VqdGluLCBNYXR0
aGV3IEZsdWV0LCBTdXJlc2gNCiAqICAgIEphZ2FubmF0aGFuLCBhbmQgU3Rl
cGhlbiBXZWVrcy4NCiAqIENvcHlyaWdodCAoQykgMTk5Ny0xOTk5IE5FQyBS
ZXNlYXJjaCBJbnN0aXR1dGUuDQogKg0KICogTUx0b24gaXMgcmVsZWFzZWQg
dW5kZXIgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIChHUEwpLg0K
ICogUGxlYXNlIHNlZSB0aGUgZmlsZSBNTHRvbi1MSUNFTlNFIGZvciBsaWNl
bnNlIGluZm9ybWF0aW9uLg0KICovDQoNCiNpbmNsdWRlICJnYy5oIg0KI2lu
Y2x1ZGUgPGVycm5v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