Problem with Socket under Linux...

Andreas Raab Andreas.Raab at gmx.de
Sat Apr 27 23:29:50 UTC 2002


John,

> I'm not sure what other 'well defined' specifications you need?

"Well defined" as in "do not second-guess how the Smalltalk code is
written". E.g., 

> Read this, http://www.smalltalkconsulting.com/html/OTNotes1.html if 

says a lot of things about how the Smalltalk is written and what to do
about specific uses such as in:

> The Smalltalk class library primSocketReceiveDataAvailable method is
called from
>
> Socket>>dataAvailable
> Socket>>waitForDataUntil
>
> In waitForDataUntil if you have no data then you wait on the
> readSemaphore. This infers that intent since other places call
> dataAvailable and may or may not wait on the semaphore.

That's just not well defined because the only thing it means is that we
never must change the Smalltalk code unless we change also the VM code.
With the one-semaphore primitives, there is exactly one rule: Signal the
semaphore when the socket state changes. Period. The Smalltalk code can
be written in any way, as long as it checks for the kind of state change
that has happened.

Also, I've been over your description many times and I just could not
understand into what more common (e.g., BSD) terms most of it
translates. Formulations like:

> The Read Semaphore is signaled when data arrives at
> the interrupt level for a socket and the trigger is true,
> the trigger is reset.The Read Semaphore trigger is set when
> the user calls sqlSocketReceiveDataAvailable and we do NOT have
> any data waiting to be read we of course return false from the
routine.

don't exactly help. I just don't understand a word of what you're trying
to say. It may be that I'm just no native speaker but I just can't
figure out what that is supposed to mean ;-(

Cheers,
  - Andreas




More information about the Squeak-dev mailing list