/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */ /* * cn_proc.h - process events connector * * Copyright (C) Matt Helsley, IBM Corp. 2005 * Based on cn_fork.h by Nguyen Anh Quynh and Guillaume Thouvenin * Copyright (C) 2005 Nguyen Anh Quynh <[email protected]> * Copyright (C) 2005 Guillaume Thouvenin <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef _UAPICN_PROC_H #define _UAPICN_PROC_H #include <linux/types.h> /* * Userspace sends this enum to register with the kernel that it is listening * for events on the connector. */ enum proc_cn_mcast_op { … }; #define PROC_EVENT_ALL … /* * If you add an entry in proc_cn_event, make sure you add it in * PROC_EVENT_ALL above as well. */ enum proc_cn_event { … }; struct proc_input { … }; static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type) { … } /* * From the user's point of view, the process * ID is the thread group ID and thread ID is the internal * kernel "pid". So, fields are assigned as follow: * * In user space - In kernel space * * parent process ID = parent->tgid * parent thread ID = parent->pid * child process ID = child->tgid * child thread ID = child->pid */ struct proc_event { … }; #endif /* _UAPICN_PROC_H */