122851890Sopenharmony_ci/**************************************************************************** 222851890Sopenharmony_ci **************************************************************************** 322851890Sopenharmony_ci *** 422851890Sopenharmony_ci *** This header was automatically generated from a Linux kernel header 522851890Sopenharmony_ci *** of the same name, to make information necessary for userspace to 622851890Sopenharmony_ci *** call into the kernel available to libc. It contains only constants, 722851890Sopenharmony_ci *** structures, and macros generated from the original header, and thus, 822851890Sopenharmony_ci *** contains no copyrightable information. 922851890Sopenharmony_ci *** 1022851890Sopenharmony_ci *** To edit the content of this header, modify the corresponding 1122851890Sopenharmony_ci *** source file (e.g. under external/kernel-headers/original/) then 1222851890Sopenharmony_ci *** run bionic/libc/kernel/tools/update_all.py 1322851890Sopenharmony_ci *** 1422851890Sopenharmony_ci *** Any manual change here will be lost the next time this script will 1522851890Sopenharmony_ci *** be run. You've been warned! 1622851890Sopenharmony_ci *** 1722851890Sopenharmony_ci **************************************************************************** 1822851890Sopenharmony_ci ****************************************************************************/ 1922851890Sopenharmony_ci#ifndef _ASM_GENERIC_FCNTL_H 2022851890Sopenharmony_ci#define _ASM_GENERIC_FCNTL_H 2122851890Sopenharmony_ci 2222851890Sopenharmony_ci#include <linux/types.h> 2322851890Sopenharmony_ci#define O_ACCMODE 00000003 2422851890Sopenharmony_ci#define O_RDONLY 00000000 2522851890Sopenharmony_ci#define O_WRONLY 00000001 2622851890Sopenharmony_ci#define O_RDWR 00000002 2722851890Sopenharmony_ci#ifndef O_CREAT 2822851890Sopenharmony_ci#define O_CREAT 00000100 2922851890Sopenharmony_ci#endif 3022851890Sopenharmony_ci#ifndef O_EXCL 3122851890Sopenharmony_ci#define O_EXCL 00000200 3222851890Sopenharmony_ci#endif 3322851890Sopenharmony_ci#ifndef O_NOCTTY 3422851890Sopenharmony_ci#define O_NOCTTY 00000400 3522851890Sopenharmony_ci#endif 3622851890Sopenharmony_ci#ifndef O_TRUNC 3722851890Sopenharmony_ci#define O_TRUNC 00001000 3822851890Sopenharmony_ci#endif 3922851890Sopenharmony_ci#ifndef O_APPEND 4022851890Sopenharmony_ci#define O_APPEND 00002000 4122851890Sopenharmony_ci#endif 4222851890Sopenharmony_ci#ifndef O_NONBLOCK 4322851890Sopenharmony_ci#define O_NONBLOCK 00004000 4422851890Sopenharmony_ci#endif 4522851890Sopenharmony_ci#ifndef O_DSYNC 4622851890Sopenharmony_ci#define O_DSYNC 00010000 4722851890Sopenharmony_ci#endif 4822851890Sopenharmony_ci#ifndef FASYNC 4922851890Sopenharmony_ci#define FASYNC 00020000 5022851890Sopenharmony_ci#endif 5122851890Sopenharmony_ci#ifndef O_DIRECT 5222851890Sopenharmony_ci#define O_DIRECT 00040000 5322851890Sopenharmony_ci#endif 5422851890Sopenharmony_ci#ifndef O_LARGEFILE 5522851890Sopenharmony_ci#define O_LARGEFILE 00100000 5622851890Sopenharmony_ci#endif 5722851890Sopenharmony_ci#ifndef O_DIRECTORY 5822851890Sopenharmony_ci#define O_DIRECTORY 00200000 5922851890Sopenharmony_ci#endif 6022851890Sopenharmony_ci#ifndef O_NOFOLLOW 6122851890Sopenharmony_ci#define O_NOFOLLOW 00400000 6222851890Sopenharmony_ci#endif 6322851890Sopenharmony_ci#ifndef O_NOATIME 6422851890Sopenharmony_ci#define O_NOATIME 01000000 6522851890Sopenharmony_ci#endif 6622851890Sopenharmony_ci#ifndef O_CLOEXEC 6722851890Sopenharmony_ci#define O_CLOEXEC 02000000 6822851890Sopenharmony_ci#endif 6922851890Sopenharmony_ci#ifndef O_SYNC 7022851890Sopenharmony_ci#define __O_SYNC 04000000 7122851890Sopenharmony_ci#define O_SYNC (__O_SYNC | O_DSYNC) 7222851890Sopenharmony_ci#endif 7322851890Sopenharmony_ci#ifndef O_PATH 7422851890Sopenharmony_ci#define O_PATH 010000000 7522851890Sopenharmony_ci#endif 7622851890Sopenharmony_ci#ifndef __O_TMPFILE 7722851890Sopenharmony_ci#define __O_TMPFILE 020000000 7822851890Sopenharmony_ci#endif 7922851890Sopenharmony_ci#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) 8022851890Sopenharmony_ci#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) 8122851890Sopenharmony_ci#ifndef O_NDELAY 8222851890Sopenharmony_ci#define O_NDELAY O_NONBLOCK 8322851890Sopenharmony_ci#endif 8422851890Sopenharmony_ci#define F_DUPFD 0 8522851890Sopenharmony_ci#define F_GETFD 1 8622851890Sopenharmony_ci#define F_SETFD 2 8722851890Sopenharmony_ci#define F_GETFL 3 8822851890Sopenharmony_ci#define F_SETFL 4 8922851890Sopenharmony_ci#ifndef F_GETLK 9022851890Sopenharmony_ci#define F_GETLK 5 9122851890Sopenharmony_ci#define F_SETLK 6 9222851890Sopenharmony_ci#define F_SETLKW 7 9322851890Sopenharmony_ci#endif 9422851890Sopenharmony_ci#ifndef F_SETOWN 9522851890Sopenharmony_ci#define F_SETOWN 8 9622851890Sopenharmony_ci#define F_GETOWN 9 9722851890Sopenharmony_ci#endif 9822851890Sopenharmony_ci#ifndef F_SETSIG 9922851890Sopenharmony_ci#define F_SETSIG 10 10022851890Sopenharmony_ci#define F_GETSIG 11 10122851890Sopenharmony_ci#endif 10222851890Sopenharmony_ci#ifndef __LP64__ 10322851890Sopenharmony_ci#ifndef F_GETLK64 10422851890Sopenharmony_ci#define F_GETLK64 12 10522851890Sopenharmony_ci#define F_SETLK64 13 10622851890Sopenharmony_ci#define F_SETLKW64 14 10722851890Sopenharmony_ci#endif 10822851890Sopenharmony_ci#endif 10922851890Sopenharmony_ci#ifndef F_SETOWN_EX 11022851890Sopenharmony_ci#define F_SETOWN_EX 15 11122851890Sopenharmony_ci#define F_GETOWN_EX 16 11222851890Sopenharmony_ci#endif 11322851890Sopenharmony_ci#ifndef F_GETOWNER_UIDS 11422851890Sopenharmony_ci#define F_GETOWNER_UIDS 17 11522851890Sopenharmony_ci#endif 11622851890Sopenharmony_ci#define F_OFD_GETLK 36 11722851890Sopenharmony_ci#define F_OFD_SETLK 37 11822851890Sopenharmony_ci#define F_OFD_SETLKW 38 11922851890Sopenharmony_ci#define F_OWNER_TID 0 12022851890Sopenharmony_ci#define F_OWNER_PID 1 12122851890Sopenharmony_ci#define F_OWNER_PGRP 2 12222851890Sopenharmony_cistruct f_owner_ex { 12322851890Sopenharmony_ci int type; 12422851890Sopenharmony_ci __kernel_pid_t pid; 12522851890Sopenharmony_ci}; 12622851890Sopenharmony_ci#define FD_CLOEXEC 1 12722851890Sopenharmony_ci#ifndef F_RDLCK 12822851890Sopenharmony_ci#define F_RDLCK 0 12922851890Sopenharmony_ci#define F_WRLCK 1 13022851890Sopenharmony_ci#define F_UNLCK 2 13122851890Sopenharmony_ci#endif 13222851890Sopenharmony_ci#ifndef F_EXLCK 13322851890Sopenharmony_ci#define F_EXLCK 4 13422851890Sopenharmony_ci#define F_SHLCK 8 13522851890Sopenharmony_ci#endif 13622851890Sopenharmony_ci#define LOCK_SH 1 13722851890Sopenharmony_ci#define LOCK_EX 2 13822851890Sopenharmony_ci#define LOCK_NB 4 13922851890Sopenharmony_ci#define LOCK_UN 8 14022851890Sopenharmony_ci#define LOCK_MAND 32 14122851890Sopenharmony_ci#define LOCK_READ 64 14222851890Sopenharmony_ci#define LOCK_WRITE 128 14322851890Sopenharmony_ci#define LOCK_RW 192 14422851890Sopenharmony_ci#define F_LINUX_SPECIFIC_BASE 1024 14522851890Sopenharmony_ci#ifndef HAVE_ARCH_STRUCT_FLOCK 14622851890Sopenharmony_ci#ifndef __ARCH_FLOCK_PAD 14722851890Sopenharmony_ci#define __ARCH_FLOCK_PAD 14822851890Sopenharmony_ci#endif 14922851890Sopenharmony_ci 15022851890Sopenharmony_cistruct flock { 15122851890Sopenharmony_ci short l_type; 15222851890Sopenharmony_ci short l_whence; 15322851890Sopenharmony_ci __kernel_off_t l_start; 15422851890Sopenharmony_ci __kernel_off_t l_len; 15522851890Sopenharmony_ci __kernel_pid_t l_pid; 15622851890Sopenharmony_ci __ARCH_FLOCK_PAD 15722851890Sopenharmony_ci}; 15822851890Sopenharmony_ci#endif 15922851890Sopenharmony_ci#ifndef HAVE_ARCH_STRUCT_FLOCK64 16022851890Sopenharmony_ci#ifndef __ARCH_FLOCK64_PAD 16122851890Sopenharmony_ci#define __ARCH_FLOCK64_PAD 16222851890Sopenharmony_ci#endif 16322851890Sopenharmony_ci 16422851890Sopenharmony_cistruct flock64 { 16522851890Sopenharmony_ci short l_type; 16622851890Sopenharmony_ci short l_whence; 16722851890Sopenharmony_ci __kernel_loff_t l_start; 16822851890Sopenharmony_ci __kernel_loff_t l_len; 16922851890Sopenharmony_ci __kernel_pid_t l_pid; 17022851890Sopenharmony_ci __ARCH_FLOCK64_PAD 17122851890Sopenharmony_ci}; 17222851890Sopenharmony_ci#endif 17322851890Sopenharmony_ci#endif 174