aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2018-10-03 17:25:38 -0400
committerJan Kara <jack@suse.cz>2018-10-08 07:48:45 -0400
commitd0a6a87e40da49cfc7954c491d3065a25a641b29 (patch)
tree49e34224bcda4f0a436beb3b4a4e0214606dfaa1 /include/uapi/linux
parentbdd5a46fe30653cb4d26c7c787a22159bf79eed9 (diff)
fanotify: support reporting thread id instead of process id
In order to identify which thread triggered the event in a multi-threaded program, add the FAN_REPORT_TID flag in fanotify_init to opt-in for reporting the event creator's thread id information. Signed-off-by: nixiaoming <nixiaoming@huawei.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/fanotify.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h
index d0c05de670ef..b86740d1c50a 100644
--- a/include/uapi/linux/fanotify.h
+++ b/include/uapi/linux/fanotify.h
@@ -40,6 +40,9 @@
40#define FAN_UNLIMITED_MARKS 0x00000020 40#define FAN_UNLIMITED_MARKS 0x00000020
41#define FAN_ENABLE_AUDIT 0x00000040 41#define FAN_ENABLE_AUDIT 0x00000040
42 42
43/* Flags to determine fanotify event format */
44#define FAN_REPORT_TID 0x00000100 /* event->pid is thread id */
45
43/* Deprecated - do not use this in programs and do not add new flags here! */ 46/* Deprecated - do not use this in programs and do not add new flags here! */
44#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ 47#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
45 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\ 48 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\