kern.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __KERN_H__
  6. #define __KERN_H__
  7. /* These are all user-mode things which are convenient to call directly
  8. * from kernel code and for which writing a wrapper is too much of a pain.
  9. * The regular include files can't be included because this file is included
  10. * only into kernel code, and user-space includes conflict with kernel
  11. * includes.
  12. */
  13. extern int errno;
  14. extern int clone(int (*proc)(void *), void *sp, int flags, void *data);
  15. extern int sleep(int);
  16. extern int printf(const char *fmt, ...);
  17. extern char *strerror(int errnum);
  18. extern char *ptsname(int __fd);
  19. extern int munmap(void *, int);
  20. extern void *sbrk(int increment);
  21. extern void *malloc(int size);
  22. extern void perror(char *err);
  23. extern int kill(int pid, int sig);
  24. extern int getuid(void);
  25. extern int getgid(void);
  26. extern int pause(void);
  27. extern int write(int, const void *, int);
  28. extern void exit(int);
  29. extern int close(int);
  30. extern int read(unsigned int, char *, int);
  31. extern int pipe(int *);
  32. extern int sched_yield(void);
  33. extern int ptrace(int op, int pid, long addr, long data);
  34. #endif