Browse Source

Add atexit() and EOF to the kernel.

tags/v0.99.beta17
Sam Hocevar sam 15 years ago
parent
commit
d33ee5fc5b
2 changed files with 8 additions and 0 deletions
  1. +6
    -0
      kernel/kernel.c
  2. +2
    -0
      kernel/kernel.h

+ 6
- 0
kernel/kernel.c View File

@@ -134,6 +134,12 @@ void exit(int status)
while(1); while(1);
} }


int atexit(void (*function)(void))
{
/* FIXME: register function */
return 0;
}

/* string.h functions */ /* string.h functions */
void *memset(void *s, int c, size_t n) void *memset(void *s, int c, size_t n)
{ {


+ 2
- 0
kernel/kernel.h View File

@@ -20,6 +20,7 @@


/* Various defines */ /* Various defines */
#define NULL ((void *)0) #define NULL ((void *)0)
#define EOF (-1)
#define BUFSIZ 4096 #define BUFSIZ 4096
#define RAND_MAX ((unsigned int)0x8000000) #define RAND_MAX ((unsigned int)0x8000000)
#define INT_MAX ((int)0x7fffffff) #define INT_MAX ((int)0x7fffffff)
@@ -77,6 +78,7 @@ int rand(void);
int abs(int j); int abs(int j);
void exit(int status); void exit(int status);
void srand(unsigned int s); void srand(unsigned int s);
int atexit(void (*function)(void));
FILE *stdin, *stdout, *stderr; FILE *stdin, *stdout, *stderr;


/* string.h functions */ /* string.h functions */


Loading…
Cancel
Save