prctl.c 266 B

12345678910111213
  1. #include <sys/prctl.h>
  2. #include <stdarg.h>
  3. #include "syscall.h"
  4. int prctl(int op, ...)
  5. {
  6. unsigned long x[4];
  7. int i;
  8. va_list ap;
  9. va_start(ap, op);
  10. for (i=0; i<4; i++) x[i] = va_arg(ap, unsigned long);
  11. return syscall5(__NR_prctl, op, x[0], x[1], x[2], x[3]);
  12. }