darcs patch: Support an interrupt flag, and primitive... (and 1 more)

Tony Garnock-Jones tonyg at lshift.net
Wed Oct 26 14:42:06 PDT 2005


Wed Oct 26 22:35:32 BST 2005  Tony Garnock-Jones <tonyg at lshift.net>
  * Support an interrupt flag, and primitive for building an Interpreter.
  
  The InterruptFlag global is used to tell the "Interpreter interpret"
  method to return to its caller. This will be used in boot.c to drive
  a trampoline that allows code to switch the active Interpreter instance.
  
  The new primitive "Interpreter initializeThreadOn:" is used to create
  suspended Interpreter instances that can be switched out using
  (lobby globals specialOops at: 17) and the InterruptFlag.

Wed Oct 26 22:37:52 BST 2005  Tony Garnock-Jones <tonyg at lshift.net>
  * Modification to boot.c to drive a context-switch loop, plus support code.
  
  The new trampoline in boot.c uses (lobby globals specialOops at: 17)
  as a register containing the currently-active interpreter. Each time
  the InterruptFlag is set, the trampoline clears it, and reenters the
  interpreter.
  
  The support code in thread.slate makes use of this, replacing the 17th
  specialOop as appropriate, and managing a toy round-robin cooperative
  scheduler.
  
  NOTE: that before you apply this patch you will need to have a VM and
  image that support InterruptFlag (in the VM), "Interpreter interrupt"
  (in the image) and "Interpreter initializeThreadOn:" (also in the
  image).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 12936 bytes
Desc: A darcs patch for your repository!
Url : /archives/slate/attachments/20051026/5888a366/attachment.bin


More information about the Slate mailing list