finish rename process to priority
parent
1ff27e7de5
commit
fd0d489543
|
@ -1,5 +0,0 @@
|
|||
USING: io.backend kernel ;
|
||||
IN: io.priority
|
||||
|
||||
HOOK: get-priority io-backend ( -- n )
|
||||
HOOK: set-priority io-backend ( n -- )
|
|
@ -1,21 +0,0 @@
|
|||
USING: alien.syntax kernel io.priority io.unix.backend
|
||||
unix ;
|
||||
IN: io.unix.priority
|
||||
|
||||
: PRIO_PROCESS 0 ; inline
|
||||
: PRIO_PGRP 1 ; inline
|
||||
: PRIO_USER 2 ; inline
|
||||
|
||||
: PRIO_MIN -20 ; inline
|
||||
: PRIO_MAX 20 ; inline
|
||||
|
||||
! which/who = 0 for current process
|
||||
FUNCTION: int getpriority ( int which, int who ) ;
|
||||
FUNCTION: int setpriority ( int which, int who, int prio ) ;
|
||||
|
||||
M: unix-io get-priority ( -- n )
|
||||
clear_err_no
|
||||
0 0 getpriority dup -1 = [ check-errno ] when ;
|
||||
|
||||
M: unix-io set-priority ( n -- )
|
||||
0 0 rot setpriority io-error ;
|
|
@ -1,5 +1,5 @@
|
|||
USING: io.unix.backend io.unix.files io.unix.sockets io.timeouts
|
||||
io.unix.launcher io.unix.mmap io.backend io.unix.priority
|
||||
io.unix.launcher io.unix.mmap io.backend io.unix.process
|
||||
combinators namespaces system vocabs.loader sequences ;
|
||||
|
||||
"io.unix." os append require
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
USING: kernel ;
|
||||
IN: io.windows.process
|
||||
|
||||
M: windows-io current-priority ( -- n )
|
||||
;
|
||||
|
||||
M: windows-io set-current-priority ( n -- )
|
||||
;
|
Loading…
Reference in New Issue