On Wed, Jan 28, 2009 at 2:03 PM, John M McIntosh <johnmci@smalltalkconsulting.com> wrote:
That was the original Squeak code to deal with the interrupt key.

I you pressed the interrupt key, then the VM would see that and set the interruptPending flag which later in checkForInterrrupts would grab the TheInterruptSemaphore
which was a semaphore that the Smalltalk interrupt  handler was waiting on to let the image know the interrupt key was pressed

Obviously there was a problem in determining what an interrupt key was across all platforms, and what if you wanted to changed it?
That led to the code being moved out of the VM into EventSensor>>processEvent:   -> "Check if the event is a user interrupt"
were we look for the magic keystrokes versus doing that in the VM.

However the TheInterruptSemaphore logic in the VM still exists to  handle images from before the EventSensor work,  and is set via InputSensor>>installInterruptWatcher
EventSensor>>primInterruptSemaphore: records the semaphore so it can use it directly.


In *theory* *cough* you should be able to take a current mac vm and open a squeak image from 1995, if any one cares to try, please let me know if it works.

It certainly _won't_ work unless  TheInterruptSemaphore is defined as the correct index in the specialObjectsArray, which is what I'm asking for.  Right now TheInterruptSemaphore is defined as null:

#define TheInterruptSemaphore null

so if one opens up the 1995 image and it tries to set the input semaphore it'll simply overwrite nil, which won't make the system very happy.  So once again,

anyone know what the correct value for TheInputSemaphore should be in a circa 1995 VM/image?

TIA




On 28-Jan-09, at 1:22 PM, Eliot Miranda wrote:

Hi All,

   just noptied that in our current VM there's an undefined constant TheInputSemaphore.  This is (or rather isn't) used in Interpreter>>primitiveInputSemaphore.  I can find no clue in my current images as to what its correct old value.  Anyone have the old value (in the Interpreter and/or in Smalltalk>>specialObjectsArray)?  TIA

Eliot


--
===========================================================================
John M. McIntosh <johnmci@smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================