Module N2O ( Main = N2O ) = begin ! Calls GET_PID to get the pid of the target process, then does ! a $suspnd system service. The priority of the target process ! is increased so that it will get the CPU for long enough to be ! suspended. ! ! R.J. FitzPatrick July 1979 ! Smithsonian Astrophysical Observatory, Cambridge MA ! LIBRARY 'SYS$LIBRARY:STARLET.L32' ; BIND waktim = uplit long(%X'FD050F80', %X'FFFFFFFF'); ! 5 SECS. own status: long, pid: long, oldpri: long; EXTERNAL ROUTINE SYS$HIBER : ADDRESSING_MODE(ABSOLUTE), GET_PID; literal HIPRI = 6; global routine n2o (start_add, cli_callback) = begin status = get_pid (.cli_callback, pid) ; if .status neq ss$_normal then return .status; if .pid eql 0 then return ss$_nonexpr; status = $suspnd( pidadr=pid ) ; if .status neq ss$_normal then return .status; $setpri( pidadr=pid,pri=hipri,prvpri=oldpri ) ; $schdwk( daytim=waktim ) ; sys$hiber( ) ; $setpri( pidadr=pid,pri=.oldpri ) end; end eludom