sync.c 562 B

123456789101112131415161718192021222324252627
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * sync syscall for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #define _GNU_SOURCE
  10. #include <features.h>
  11. #include <errno.h>
  12. #include <sys/types.h>
  13. #include <sys/syscall.h>
  14. #include <unistd.h>
  15. #ifndef INLINE_SYSCALL
  16. #define INLINE_SYSCALL(name, nr, args...) __syscall_sync (args)
  17. #define __NR___syscall_sync __NR_sync
  18. static inline _syscall0(void, __syscall_sync);
  19. #endif
  20. void sync(void)
  21. {
  22. INLINE_SYSCALL(sync, 0);
  23. }