Lines Matching refs:proc_entry
264 * Return: True if the proc_entry contains a comm file with comm_prefix*.
267 static int procfs_is_workload_pid(const char *comm_prefix, struct dirent *proc_entry)
273 if (proc_entry->d_type != DT_DIR)
276 if (*proc_entry->d_name == '.')
280 for (t_name = proc_entry->d_name; t_name; t_name++) {
288 snprintf(buffer, MAX_PATH, "/proc/%s/comm", proc_entry->d_name);
306 debug_msg("Found workload pid:%s comm:%s", proc_entry->d_name, buffer);
321 struct dirent *proc_entry;
337 while ((proc_entry = readdir(procfs))) {
339 retval = procfs_is_workload_pid(comm_prefix, proc_entry);
344 retval = __set_sched_attr(atoi(proc_entry->d_name), attr);
346 err_msg("Error setting sched attributes for pid:%s\n", proc_entry->d_name);
350 debug_msg("Set sched attributes for pid:%s\n", proc_entry->d_name);
695 struct dirent *proc_entry;
738 while ((proc_entry = readdir(procfs))) {
740 retval = procfs_is_workload_pid(comm_prefix, proc_entry);
744 retval = write(cg_fd, proc_entry->d_name, strlen(proc_entry->d_name));
747 proc_entry->d_name, strerror(errno));
751 debug_msg("Set cgroup attributes for pid:%s\n", proc_entry->d_name);