mirror of
https://github.com/sched-ext/scx.git
synced 2024-12-12 11:37:18 +00:00
8f4e9e5e3b
Add pid namespace helpers for translating namespace pids. Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
18 lines
559 B
C
18 lines
559 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
|
|
*/
|
|
#ifndef __SCHED_EXT_NAMESPACE_BPF_H
|
|
#define __SCHED_EXT_NAMESPACE_BPF_H
|
|
|
|
#include "vmlinux.h"
|
|
|
|
struct pid_namespace* get_task_pid_ns(const struct task_struct* task);
|
|
struct pid* get_task_pid_ptr(const struct task_struct* task, enum pid_type type);
|
|
pid_t get_task_ns_pid(const struct task_struct* task, enum pid_type type);
|
|
|
|
pid_t get_pid_nr_ns(struct pid* pid, struct pid_namespace* ns);
|
|
pid_t get_ns_pid(void);
|
|
|
|
#endif /* __SCHED_EXT_NAMESPACE_BPF_H */
|