prctl.c 574 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (C) 2017 Andes Technology, Inc.
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. #include <errno.h>
  6. #include <stdarg.h>
  7. #include <sysdep.h>
  8. #include <sys/prctl.h>
  9. #include <sys/syscall.h>
  10. int prctl (int __option, ...)
  11. {
  12. unsigned long arg1,arg2,arg3,arg4;
  13. va_list arg;
  14. va_start (arg, __option);
  15. arg1 = va_arg (arg, unsigned long);
  16. arg2 = va_arg (arg, unsigned long);
  17. arg3 = va_arg (arg, unsigned long);
  18. arg4 = va_arg (arg, unsigned long);
  19. va_end (arg);
  20. return INLINE_SYSCALL(prctl,5,__option,arg1,arg2,arg3,arg4);
  21. }