[Squeak-e] Implementing system calls.

Alan Grimes alangrimes at starpower.net
Sat Mar 13 20:16:28 CET 2004


I'm actually making some small progress with my design. The next step 
seems to be to implement and test the following algorithm:

"Sphere Call Interface"

- Each "Sphere" has its own call interface. which is provided to ins own 
internal environment without regards to the language actually used to 
code that environment. It is therefore a given that the physical _CODE_ 
calling the call interface is from the same sphere as the instance of 
Sphere Call Interface.

1. Since threads can migrate across contexts and "visit" nested spheres, 
it is therefore necessary to determine, in an unforgable manner, the 
current context of the thread.

2. Look at the name of the target system call, the parameter provided to 
the call interface.

3. Attempt to find an implementation of the system call in The current 
context's call _interface_.

If this succedes go to 7.

4. Attempt to find the message in the _outerface_ of any of the spheres 
nested within the current context.

if this succedes go to 6.

5. go to step 3.

6. add the current task to the "visiting tasks" of the owner of the 
outerface which is servicing the system call.

7. Execute the target code within the context that was determined in #1.

8. Handle the return call, cleaning up the "visiting tasks" structure if 
necessary.


Contingiency: if a sphere dies, send an exception to all visiting tasks 
and return them to their calling context.

Any suggestions? =\


More information about the Squeak-e mailing list