kern

diff src/syscall.c @ 56:0be4615594df

finally, runqueues, blocking, waking up, idle loop etc, all seem to work fine on a single user process... Next up: try forking another one :)
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 15 Aug 2011 06:17:58 +0300
parents 4eaecb14fe31
children 437360696883
line diff
     1.1 --- a/src/syscall.c	Mon Aug 15 04:03:39 2011 +0300
     1.2 +++ b/src/syscall.c	Mon Aug 15 06:17:58 2011 +0300
     1.3 @@ -55,6 +55,9 @@
     1.4  
     1.5  static int sys_sleep(int sec)
     1.6  {
     1.7 -	printf("SYSCALL: sleep\n");
     1.8 -	return -1;
     1.9 +	printf("process %d will sleep for %d seconds\n", get_current_pid(), sec);
    1.10 +
    1.11 +	sleep(sec * 1000);
    1.12 +
    1.13 +	return 0;
    1.14  }