On this page:
os2-boot
os2-write
os2-exit
os2-test

2 OS2: bare-banes kernel with process creation system-call

 (require dos/os2) package: dos

dos/os2 extends dos by assuming that when the OS state is manipulated new processes can be created. A simple example is included in the source.

procedure

(os2-boot + cur ps zero)  
state? (treeof (-> state? state?))
  + : (-> state? state? state?)
  cur : state?
  ps : (treeof (-> state? state?))
  zero : state?
Like dos-boot but returns a list of processes in addition to the new state.

procedure

(os2-write st [#:threads ts])  state?

  st : state?
  ts : (treeof (-> state? state?)) = null
A system call that returns the state st and creates additional processes specified in ts. Returns the next state, like dos-syscall.

procedure

(os2-exit st)  void?

  st : state?
Like os2-write, but does not return.

procedure

(os2-test cur p)  state?

  cur : state?
  p : (-> state? state?)
Runs the process p with the cur state and returns the state that it computes via os2-write or os2-exit.