Initial process waiting/waking

Processes can now wait on signals/children/time. There is no clock
currently so "time" is just a monotonically increating tick count. Added
a SLEEP syscall to test this waiting/waking.
This commit is contained in:
Justin C. Miller
2018-09-16 12:22:52 -07:00
parent f4e7eaeb40
commit 482b9f50fc
7 changed files with 259 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ global _start
_start:
xor rbp, rbp ; Sentinel rbp
mov r11, 0 ; counter
mov rbx, 20 ; sleep timeout
.loop:
mov rax, 1 ; DEBUG syscall
@@ -10,13 +11,15 @@ _start:
int 0xee
inc r11
cmp r11, 3
cmp r11, 2
jle .loop
mov rax, 3 ; PAUSE syscall
mov rax, 4 ; SLEEP syscall
; syscall
int 0xee
add rbx, 20
mov r11, 0
jmp .loop