kern
changeset 60:39188bbe8638
fixed the comments in test_proc.S
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 17 Aug 2011 05:37:30 +0300 |
parents | ef9cc2e90277 |
children | 5b29b15c5412 |
files | src/test_proc.S |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/src/test_proc.S Wed Aug 17 05:33:03 2011 +0300 1.2 +++ b/src/test_proc.S Wed Aug 17 05:37:30 2011 +0300 1.3 @@ -13,16 +13,21 @@ 1.4 movl $SYS_HELLO, %eax 1.5 int $SYSCALL_INT 1.6 1.7 - /* --- call getpid --- */ 1.8 + /* --- call getpid --- 1.9 + * we'll use the process id, multiplied by two as a 1.10 + * sleep interval, to avoid having the two test processes 1.11 + * sleep for identical amounts of time. 1.12 + */ 1.13 movl $SYS_GETPID, %eax 1.14 int $SYSCALL_INT 1.15 - /* copy the pid to ebx to use as a sleep interval */ 1.16 movl %eax, %ebx 1.17 shl $1, %ebx 1.18 1.19 - /* --- sleep for 5 seconds --- */ 1.20 + /* --- sleep for (pid * 2) seconds --- 1.21 + * ebx (the argument to sleep) already contains the 1.22 + * correct value 1.23 + */ 1.24 movl $SYS_SLEEP, %eax 1.25 - /*movl $3, %ebx*/ 1.26 int $SYSCALL_INT 1.27 1.28 jmp infloop