Lines Matching full:pid
93 static inline int pid_split(unsigned int pid, unsigned int *upper1, in pid_split() argument
99 /* In case a bad pid is passed in, then fail */ in pid_split()
100 if (unlikely(pid >= MAX_PID)) in pid_split()
103 *upper1 = (pid >> UPPER1_SHIFT) & UPPER_MASK; in pid_split()
104 *upper2 = (pid >> UPPER2_SHIFT) & UPPER_MASK; in pid_split()
105 *lower = pid & LOWER_MASK; in pid_split()
119 * trace_pid_list_is_set - test if the pid is set in the list
120 * @pid_list: The pid list to test
121 * @pid: The pid to see if set in the list.
123 * Tests if @pid is set in the @pid_list. This is usually called
124 * from the scheduler when a task is scheduled. Its pid is checked
127 * Return true if the pid is in the list, false otherwise.
129 bool trace_pid_list_is_set(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_is_set() argument
142 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_is_set()
158 * trace_pid_list_set - add a pid to the list
159 * @pid_list: The pid list to add the @pid to.
160 * @pid: The pid to add.
162 * Adds @pid to @pid_list. This is usually done explicitly by a user
164 * when children should be traced and a task's pid is in the list.
168 int trace_pid_list_set(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_set() argument
181 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_set()
211 * trace_pid_list_clear - remove a pid from the list
212 * @pid_list: The pid list to remove the @pid from.
213 * @pid: The pid to remove.
215 * Removes @pid from @pid_list. This is usually done explicitly by a user
221 int trace_pid_list_clear(struct trace_pid_list *pid_list, unsigned int pid) in trace_pid_list_clear() argument
233 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_clear()
262 * trace_pid_list_next - return the next pid in the list
263 * @pid_list: The pid list to examine.
264 * @pid: The pid to start from
265 * @next: The pointer to place the pid that is set starting from @pid.
267 * Looks for the next consecutive pid that is in @pid_list starting
268 * at the pid specified by @pid. If one is set (including @pid), then
269 * that pid is placed into @next.
271 * Return 0 when a pid is found, -1 if there are no more pids included.
273 int trace_pid_list_next(struct trace_pid_list *pid_list, unsigned int pid, in trace_pid_list_next() argument
286 if (pid_split(pid, &upper1, &upper2, &lower) < 0) in trace_pid_list_next()
318 * trace_pid_list_first - return the first pid in the list
319 * @pid_list: The pid list to examine.
320 * @pid: The pointer to place the pid first found pid that is set.
322 * Looks for the first pid that is set in @pid_list, and places it
323 * into @pid if found.
325 * Return 0 when a pid is found, -1 if there are no pids set.
327 int trace_pid_list_first(struct trace_pid_list *pid_list, unsigned int *pid) in trace_pid_list_first() argument
329 return trace_pid_list_next(pid_list, 0, pid); in trace_pid_list_first()