mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-16 19:04:41 +08:00
d977706172
[ Upstream commit 6954e41526
]
Instead of having the logic that does trace_pid_list open coded, wrap it in
abstract functions. This will allow a rewrite of the logic that implements
the trace_pid_list without affecting the users.
Note, this causes a change in behavior. Every time a pid is written into
the set_*_pid file, it creates a new list and uses RCU to update it. If
pid_max is lowered, but there was a pid currently in the list that was
higher than pid_max, those pids will now be removed on updating the list.
The old behavior kept that from happening.
The rewrite of the pid_list logic will no longer depend on pid_max,
and will return the old behavior.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 lines
257 B
C
14 lines
257 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
/* Do not include this file directly. */
|
|
|
|
#ifndef _TRACE_INTERNAL_PID_LIST_H
|
|
#define _TRACE_INTERNAL_PID_LIST_H
|
|
|
|
struct trace_pid_list {
|
|
int pid_max;
|
|
unsigned long *pids;
|
|
};
|
|
|
|
#endif /* _TRACE_INTERNAL_PID_LIST_H */
|