linux/include/linux/user_events.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2022, Microsoft Corporation.
 *
 * Authors:
 *   Beau Belgrave <[email protected]>
 */

#ifndef _LINUX_USER_EVENTS_H
#define _LINUX_USER_EVENTS_H

#include <linux/list.h>
#include <linux/refcount.h>
#include <linux/mm_types.h>
#include <linux/workqueue.h>
#include <uapi/linux/user_events.h>

#ifdef CONFIG_USER_EVENTS
struct user_event_mm {};

extern void user_event_mm_dup(struct task_struct *t,
			      struct user_event_mm *old_mm);

extern void user_event_mm_remove(struct task_struct *t);

static inline void user_events_fork(struct task_struct *t,
				    unsigned long clone_flags)
{}

static inline void user_events_execve(struct task_struct *t)
{}

static inline void user_events_exit(struct task_struct *t)
{}
#else
static inline void user_events_fork(struct task_struct *t,
				    unsigned long clone_flags)
{
}

static inline void user_events_execve(struct task_struct *t)
{
}

static inline void user_events_exit(struct task_struct *t)
{
}
#endif /* CONFIG_USER_EVENTS */

#endif /* _LINUX_USER_EVENTS_H */