Searched refs:pid (Results 1 - 25 of 145) sorted by relevance

123456

/system/vold/
H A DProcess.h26 static int checkSymLink(int pid, const char *path, const char *name);
27 static int checkFileMaps(int pid, const char *path);
28 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max);
29 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint);
30 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max);
31 static void getProcessName(int pid, char *buffer, size_t max);
H A DProcess.cpp66 void Process::getProcessName(int pid, char *buffer, size_t max) { argument
68 snprintf(buffer, max, "/proc/%d/cmdline", pid);
79 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint) { argument
80 return checkFileDescriptorSymLinks(pid, mountPoint, NULL, 0);
83 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max) { argument
88 sprintf(path, "/proc/%d/fd", pid);
124 int Process::checkFileMaps(int pid, const char *mountPoint) { argument
125 return checkFileMaps(pid, mountPoint, NULL, 0);
128 int Process::checkFileMaps(int pid, const char *mountPoint, char *openFilename, size_t max) { argument
132 sprintf(buffer, "/proc/%d/maps", pid);
154 checkSymLink(int pid, const char *mountPoint, const char *name) argument
190 int pid = getPid(de->d_name); local
[all...]
/system/core/include/cutils/
H A Diosched_policy.h31 extern int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio);
32 extern int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio);
/system/netd/server/
H A DClatdController.cpp52 pid_t pid = getClatdPid(interface); local
54 if (pid != 0) {
55 ALOGE("clatd pid=%d already started on %s", pid, interface);
85 if ((pid = fork()) < 0) {
90 if (!pid) {
109 mClatdPids[interface] = pid;
117 pid_t pid = getClatdPid(interface); local
119 if (pid == 0) {
124 ALOGD("Stopping clatd pid
137 pid_t pid = getClatdPid(interface); local
[all...]
/system/core/toolbox/
H A Drenice.c44 fprintf(stderr, "USAGE: %s [[-r] [-t TYPE] priority pids ...] [-g pid]\n", s);
48 void print_prio(pid_t pid) argument
53 printf("pid %d's priority: %d\n", pid, getpriority(PRIO_PROCESS, pid));
56 sched = sched_getscheduler(pid);
74 sched_getparam(pid, &sp);
134 pid_t pid; local
136 pid = atoi(argv[0]);
144 ret = sched_setscheduler(pid, sche
[all...]
H A Dprlimit.c41 fprintf(stderr, "usage: %s pid resource cur max\n", s);
47 pid_t pid; local
55 if (sscanf(argv[1], "%d", &pid) != 1)
67 printf("setting resource %d of pid %d to [%llu,%llu]\n", resource, pid,
69 rc = prlimit64(pid, resource, &rl, NULL);
H A Dionice.c15 int pid; local
18 fprintf(stderr, "usage: ionice <pid> [none|rt|be|idle] [prio]\n");
22 if (!(pid = atoi(argv[1]))) {
23 fprintf(stderr, "Invalid pid specified\n");
28 if (android_get_ioprio(pid, &clazz, &ioprio)) {
32 fprintf(stdout, "Pid %d, class %s (%d), prio %d\n", pid, classes[clazz], clazz, ioprio);
51 printf("Setting pid %d i/o class to %d, prio %d\n", pid, clazz, ioprio);
52 if (android_set_ioprio(pid, clazz, ioprio)) {
H A Dps.c42 static void print_exe_abi(int pid);
44 static int ps_line(int pid, int tid, char *namefilter) argument
60 sprintf(statline, "/proc/%d", pid);
64 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid);
66 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid);
68 sprintf(statline, "/proc/%d/stat", pid);
69 sprintf(cmdline, "/proc/%d/cmdline", pid);
70 snprintf(macline, sizeof(macline), "/proc/%d/attr/current", pid);
90 nexttok(&ptr); // skip pid
146 ppid = pid;
209 print_exe_abi(int pid) argument
243 ps_threads(int pid, char *namefilter) argument
316 int pid = atoi(de->d_name); local
[all...]
/system/extras/tests/cpueater/
H A Dcpueater.c30 pid_t pid; local
45 switch(pid = fork()) {
69 printf("%d\n", pid);
H A Ddaemonize.c33 int pid, fd, mode; local
84 switch(pid = fork()) {
104 switch(pid = fork()) {
117 waitpid(pid, &status, 0);
/system/core/libcutils/
H A Diosched_policy.c34 int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_unused, int ioprio __android_unused) {
36 if (syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, ioprio | (clazz << IOPRIO_CLASS_SHIFT))) {
43 int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *ioprio) {
47 if ((rc = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, pid)) < 0) {
/system/core/libbacktrace/
H A DBacktrace.cpp42 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) argument
43 : pid_(pid), tid_(tid), map_(map), map_shared_(true) {
45 map_ = BacktraceMap::Create(pid);
127 Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { argument
128 if (pid == BACKTRACE_CURRENT_PROCESS) {
129 pid = getpid();
134 tid = pid;
137 if (pid == getpid()) {
138 return new UnwindCurrent(pid, tid, map);
140 return new UnwindPtrace(pid, ti
[all...]
H A DBacktracePtrace.h29 BacktracePtrace(pid_t pid, pid_t tid, BacktraceMap* map) : Backtrace(pid, tid, map) {} argument
/system/core/fs_mgr/
H A Dfs_mgr_format.c67 int pid; local
74 pid = fork();
75 if (pid < 0) {
76 return pid;
78 if (!pid) {
84 pid_t p = waitpid(pid, &rc, 0);
85 if (p != pid) {
/system/core/libprocessgroup/
H A Dprocessgroup.cpp56 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) argument
63 pid);
66 static int initCtx(uid_t uid, int pid, struct ctx *ctx) argument
70 convertUidPidToPath(path, sizeof(path), uid, pid);
135 long pid = strtol(ctx->buf_ptr, &pid_eptr, 10); local
146 return (pid_t)pid;
149 static int removeProcessGroup(uid_t uid, int pid) argument
154 convertUidPidToPath(path, sizeof(path), uid, pid);
220 pid_t pid; local
224 while ((pid
330 char pid[PROCESSGROUP_MAX_PID_LEN + 1] = {0}; local
[all...]
/system/core/liblog/tests/
H A Dlibc_test.cpp39 pid_t pid = getpid(); local
42 LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid)));
59 ASSERT_EQ(log_msg.entry.pid, pid);
99 pid_t pid = getpid(); local
102 (log_id_t)LOG_ID_CRASH, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid)));
120 ASSERT_EQ(log_msg.entry.pid, pid);
/system/core/logd/
H A Dlibaudit.h43 pid_t pid; member in struct:audit_sig_info
85 * Sets a pid to recieve audit netlink events from the kernel
88 * @param pid
89 * The pid whom to set as the reciever of audit messages
93 extern int audit_setup(int fd, uint32_t pid);
H A DLogBuffer.h52 uid_t uid, pid_t pid, pid_t tid,
75 char *pidToName(pid_t pid) { return stats.pidToName(pid); } argument
76 uid_t pidToUid(pid_t pid) { return stats.pidToUid(pid); } argument
/system/core/debuggerd/
H A Dbacktrace.h28 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed,
H A Dtombstone.h26 char* engrave_tombstone(pid_t pid, pid_t tid, int signal, int original_si_code,
H A Dbacktrace.cpp41 static void dump_process_header(log_t* log, pid_t pid) { argument
47 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);
58 _LOG(log, logtype::BACKTRACE, "\n\n----- pid %d at %s -----\n", pid, timestr);
66 static void dump_process_footer(log_t* log, pid_t pid) { argument
67 _LOG(log, logtype::BACKTRACE, "\n----- end %d -----\n", pid);
113 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed, argument
119 dump_process_header(&log, pid);
123 snprintf(task_path, sizeof(task_path), "/proc/%d/task", pid);
143 dump_process_footer(&log, pid);
[all...]
/system/extras/perfprofd/quipper/kernel-headers/tools/perf/util/
H A Dtarget.h23 const char * pid; member in struct:perf_target
/system/extras/simpleperf/
H A Devent_fd.h40 static std::unique_ptr<EventFd> OpenEventFileForProcess(const perf_event_attr& attr, pid_t pid);
42 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t pid, int cpu);
46 // Give information about this perf_event_file, like (event_name, pid, cpu).
75 EventFd(int perf_event_fd, const std::string& event_name, pid_t pid, int cpu) argument
79 pid_(pid),
/system/core/libmemtrack/
H A Dmemtrack_test.c28 static int getprocname(pid_t pid, char *buf, int len) { argument
38 if (asprintf(&filename, "/proc/%d/cmdline", pid) < 0) {
111 pid_t pid = pids[i]; local
120 getprocname(pid, cmdline, (int)sizeof(cmdline));
122 ret = memtrack_proc_get(p, pid);
124 fprintf(stderr, "failed to get memory info for pid %d: %s (%d)\n",
125 pid, strerror(-ret), ret);
137 printf("%5d %6zu %6zu %6zu %6zu %6zu %6zu %s\n", pid,
/system/core/init/
H A Dsignal_handler.cpp55 pid_t pid = TEMP_FAILURE_RETRY(waitpid(-1, &status, WNOHANG)); local
56 if (pid == 0) {
58 } else if (pid == -1) {
63 service* svc = service_find_by_pid(pid);
67 name = android::base::StringPrintf("Service '%s' (pid %d)", svc->name, pid);
69 name = android::base::StringPrintf("Untracked pid %d", pid);
81 NOTICE("Service '%s' (pid %d) killing any children in process group\n", svc->name, pid);
[all...]

Completed in 325 milliseconds

123456