kern

changeset 63:f44bec97a0ec

added errno.h in klibc
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 17 Aug 2011 05:42:44 +0300
parents 38f768da2f31
children c2692696f9ab
files src/klibc/errno.h src/proc.c src/timer.c
diffstat 3 files changed, 9 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/klibc/errno.h	Wed Aug 17 05:42:44 2011 +0300
     1.3 @@ -0,0 +1,6 @@
     1.4 +#ifndef ERRNO_H_
     1.5 +#define ERRNO_H_
     1.6 +
     1.7 +#define EAGAIN		1
     1.8 +
     1.9 +#endif	/* ERRNO_H_ */
     2.1 --- a/src/proc.c	Wed Aug 17 05:39:39 2011 +0300
     2.2 +++ b/src/proc.c	Wed Aug 17 05:42:44 2011 +0300
     2.3 @@ -166,7 +166,6 @@
     2.4  		return -EAGAIN;
     2.5  	}
     2.6  	p->ctx.stack_ptr = PAGE_TO_ADDR(p->kern_stack_pg) + KERN_STACK_SIZE;
     2.7 -
     2.8  	/* we need to copy the current interrupt frame to the new kernel stack so
     2.9  	 * that the new process will return to the same point as the parent, just
    2.10  	 * after the fork syscall.
     3.1 --- a/src/timer.c	Wed Aug 17 05:39:39 2011 +0300
     3.2 +++ b/src/timer.c	Wed Aug 17 05:42:44 2011 +0300
     3.3 @@ -49,7 +49,7 @@
     3.4  };
     3.5  
     3.6  
     3.7 -static void intr_handler();
     3.8 +static void timer_handler();
     3.9  
    3.10  
    3.11  static struct timer_event *evlist;
    3.12 @@ -72,7 +72,7 @@
    3.13  	outb((reload_count >> 8) & 0xff, PORT_DATA0);
    3.14  
    3.15  	/* set the timer interrupt handler */
    3.16 -	interrupt(IRQ_TO_INTR(0), intr_handler);
    3.17 +	interrupt(IRQ_TO_INTR(0), timer_handler);
    3.18  }
    3.19  
    3.20  void sleep(unsigned long msec)
    3.21 @@ -133,7 +133,7 @@
    3.22   * every 1/250th of a second, so it must be extremely fast.
    3.23   * For now, just increasing a tick counter will suffice.
    3.24   */
    3.25 -static void intr_handler(int inum)
    3.26 +static void timer_handler(int inum)
    3.27  {
    3.28  	int istate;
    3.29  	struct process *p;