summaryrefslogtreecommitdiff
path: root/labs
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-08-02 13:18:26 -0400
committerRobert Morris <[email protected]>2019-08-02 13:18:26 -0400
commit9110f40b7d65e7090b6214fd5db4814693b2e635 (patch)
tree908d5a678bb9b719b9647a154e178eb9ed2cf61d /labs
parent0c10cbe829787a2745b0f7e3ad46f200b0b94d34 (diff)
downloadxv6-labs-9110f40b7d65e7090b6214fd5db4814693b2e635.tar.gz
xv6-labs-9110f40b7d65e7090b6214fd5db4814693b2e635.tar.bz2
xv6-labs-9110f40b7d65e7090b6214fd5db4814693b2e635.zip
sigalarm
Diffstat (limited to 'labs')
-rw-r--r--labs/syscall.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/labs/syscall.html b/labs/syscall.html
index 72ef19b..9a24a7c 100644
--- a/labs/syscall.html
+++ b/labs/syscall.html
@@ -143,12 +143,12 @@ void test0()
{
int i;
printf(1, "test0 start\n");
- alarm(2, periodic);
+ sigalarm(2, periodic);
for(i = 0; i < 1000*500000; i++){
if((i % 250000) == 0)
write(2, ".", 1);
}
- alarm(0, 0);
+ sigalarm(0, 0);
printf(1, "test0 done\n");
}
@@ -171,7 +171,7 @@ void test1() {
printf(1, "test1 start\n");
j = 0;
- alarm(2, periodic);
+ sigalarm(2, periodic);
for(i = 0; i < 1000*500000; i++){
foo(i, &j);
}
@@ -237,13 +237,14 @@ alarmtest starting
<li>You'll need to modify the Makefile to cause <tt>alarmtest.c</tt>
to be compiled as an xv6 user program.
-<li>The right declaration to put in <tt>user/user.h</tt> is:
+<li>The right declarations to put in <tt>user/user.h</tt> is:
<pre>
int sigalarm(int ticks, void (*handler)());
</pre>
-<li>Update kernel/syscall.h and user/usys.S (update usys.pl to update
- usys.S) to allow <tt>alarmtest</tt> to invoke the sigalarm system
+<li>Update user/sys.pl (which generates user/usys.S),
+ kernel/syscall.h, and kernel/syscall.c
+ to allow <tt>alarmtest</tt> to invoke the sigalarm system
call.
<li>Your <tt>sys_sigalarm()</tt> should store the alarm interval and