fcntl.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <Kernel/API/POSIX/fcntl.h>
  9. #include <Kernel/API/POSIX/sys/stat.h>
  10. #include <sys/cdefs.h>
  11. __BEGIN_DECLS
  12. #define POSIX_FADV_DONTNEED 1
  13. #define POSIX_FADV_NOREUSE 2
  14. #define POSIX_FADV_NORMAL 3
  15. #define POSIX_FADV_RANDOM 4
  16. #define POSIX_FADV_SEQUENTIAL 5
  17. #define POSIX_FADV_WILLNEED 6
  18. int creat(char const* path, mode_t);
  19. int open(char const* path, int options, ...);
  20. int openat(int dirfd, char const* path, int options, ...);
  21. int fcntl(int fd, int cmd, ...);
  22. int create_inode_watcher(unsigned flags);
  23. int inode_watcher_add_watch(int fd, char const* path, size_t path_length, unsigned event_mask);
  24. int inode_watcher_remove_watch(int fd, int wd);
  25. int posix_fadvise(int fd, off_t offset, off_t len, int advice);
  26. int posix_fallocate(int fd, off_t offset, off_t len);
  27. int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag);
  28. __END_DECLS