syscall.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Hexagon system calls
  3. *
  4. * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 and
  8. * only version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18. * 02110-1301, USA.
  19. */
  20. #include <linux/file.h>
  21. #include <linux/fs.h>
  22. #include <linux/linkage.h>
  23. #include <linux/mm.h>
  24. #include <linux/module.h>
  25. #include <linux/sched.h>
  26. #include <linux/slab.h>
  27. #include <linux/syscalls.h>
  28. #include <linux/unistd.h>
  29. #include <asm/mman.h>
  30. #include <asm/registers.h>
  31. /*
  32. * System calls with architecture-specific wrappers.
  33. * See signal.c for signal-related system call wrappers.
  34. */
  35. asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
  36. unsigned long parent_tidp, unsigned long child_tidp)
  37. {
  38. struct pt_regs *pregs = current_pt_regs();
  39. if (!newsp)
  40. newsp = pregs->SP;
  41. return do_fork(clone_flags, newsp, pregs, 0, (int __user *)parent_tidp,
  42. (int __user *)child_tidp);
  43. }