Home | History | Annotate | Download | only in src

Lines Matching refs:attr

67 static int openattr(pid_t pid, const char *attr, int flags)
74 rc = asprintf(&path, "/proc/%d/attr/%s", pid, attr);
76 rc = asprintf(&path, "/proc/thread-self/attr/%s", attr);
84 rc = asprintf(&path, "/proc/self/task/%d/attr/%s", tid, attr);
96 pid_t pid, const char *attr)
108 switch (attr[0]) {
140 fd = openattr(pid, attr, O_RDONLY);
179 pid_t pid, const char *attr)
184 ret = getprocattrcon_raw(&rcontext, pid, attr);
195 pid_t pid, const char *attr)
205 switch (attr[0]) {
232 fd = openattr(pid, attr, O_RDWR);
264 pid_t pid, const char *attr)
272 ret = setprocattrcon_raw(rcontext, pid, attr);
279 #define getselfattr_def(fn, attr) \
282 return getprocattrcon_raw(c, 0, #attr); \
286 return getprocattrcon(c, 0, #attr); \
289 #define setselfattr_def(fn, attr) \
292 return setprocattrcon_raw(c, 0, #attr); \
296 return setprocattrcon(c, 0, #attr); \
299 #define all_selfattr_def(fn, attr) \
300 getselfattr_def(fn, attr) \
301 setselfattr_def(fn, attr)
303 #define getpidattr_def(fn, attr) \
306 return getprocattrcon_raw(c, pid, #attr); \
310 return getprocattrcon(c, pid, #attr); \