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

1234

/system/vold/
H A DProcess.h24 static int checkSymLink(int pid, const char *path, const char *name);
25 static int checkFileMaps(int pid, const char *path);
26 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max);
27 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint);
28 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max);
29 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
191 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/core/debuggerd/
H A Ddebuggerd.h26 extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map,
31 extern void dump_registers(int tfd, int pid, bool at_fault);
33 extern int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map, bool at_fault);
35 void dump_pc_and_lr(int tfd, int pid, mapinfo *map, int unwound_level, bool at_fault);
37 void dump_stack_and_code(int tfd, int pid, mapinfo *map,
H A Dutility.c27 /* Get a word from pid using ptrace. The result is the return value. */
28 int get_remote_word(int pid, void *src) argument
30 return ptrace(PTRACE_PEEKTEXT, pid, src, NULL);
34 /* Handy routine to read aggregated data from pid using ptrace. The read
37 void get_remote_struct(int pid, void *src, void *dst, size_t size) argument
42 *(int *)((char *)dst+i) = ptrace(PTRACE_PEEKTEXT, pid, (char *)src+i, NULL);
49 val = ptrace(PTRACE_PEEKTEXT, pid, (char *)src+i, NULL);
H A Ddebuggerd.c173 void dump_fault_addr(int tfd, int pid, int sig) argument
178 if(ptrace(PTRACE_GETSIGINFO, pid, 0, &si)){
191 void dump_crash_banner(int tfd, unsigned pid, unsigned tid, int sig) argument
197 sprintf(data, "/proc/%d/cmdline", pid);
207 _LOG(tfd, false, "pid: %d, tid: %d >>> %s <<<\n",
208 pid, tid, x ? x : "UNKNOWN");
213 static void parse_elf_info(mapinfo *milist, pid_t pid) argument
226 get_remote_struct(pid, (void *) (mi->start), &ehdr,
237 get_remote_struct(pid, (char *) (ptr+i), &phdr,
255 void dump_crash_report(int tfd, unsigned pid, unsigne argument
385 dump_sibling_thread_report(int tfd, unsigned pid, unsigned tid) argument
432 dump_log_file(int tfd, unsigned pid, const char* filename, bool tailOnly) argument
564 dump_logs(int tfd, unsigned pid, bool tailOnly) argument
571 engrave_tombstone(unsigned pid, unsigned tid, int debug_uid, int signal) argument
[all...]
/system/core/toolbox/
H A Dionice.c14 int pid; local
17 fprintf(stderr, "usage: ionice <pid> [none|rt|be|idle] [prio]\n");
21 if (!(pid = atoi(argv[1]))) {
22 fprintf(stderr, "Invalid pid specified\n");
27 if (android_get_ioprio(pid, &clazz, &ioprio)) {
31 fprintf(stdout, "Pid %d, class %s (%d), prio %d\n", pid, classes[clazz], clazz, ioprio);
50 printf("Setting pid %d i/o class to %d, prio %d\n", pid, clazz, ioprio);
51 if (android_set_ioprio(pid, clazz, ioprio)) {
H A Drenice.c42 fprintf(stderr, "USAGE: %s [[-r] priority pids ...] [-g pid]\n", s);
46 void print_prio(pid_t pid) argument
51 printf("pid %d's priority: %d\n", pid, getpriority(PRIO_PROCESS, pid));
54 sched = sched_getscheduler(pid);
72 sched_getparam(pid, &sp);
115 pid_t pid; local
117 pid = atoi(argv[0]);
125 ret = sched_setscheduler(pid, SCHED_R
[all...]
H A Dkill.c23 int pid = atoi(argv[0]); local
24 int err = kill(pid, sig);
27 fprintf(stderr, "could not kill pid %d: %s\n", pid, strerror(errno));
H A Dschedtop.c18 int pid; member in struct:thread_info
94 static void add_thread(int pid, int tid, struct thread_info *proc_info) argument
104 info->pid = pid;
108 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid);
110 sprintf(line, "/proc/%d/schedstat", pid);
123 sprintf(line, "/proc/%d/cmdline", pid);
131 sprintf(line, "/proc/%d/task/%d/stat", pid, tid);
133 sprintf(line, "/proc/%d/stat", pid);
155 static void add_threads(int pid, struc argument
172 print_threads(int pid, uint32_t flags) argument
203 int pid = atoi(de->d_name); local
231 int pid = last_processes.data[i].pid; local
[all...]
H A Dps.c34 static int ps_line(int pid, int tid, char *namefilter) argument
48 sprintf(statline, "/proc/%d", pid);
52 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid);
55 sprintf(statline, "/proc/%d/stat", pid);
56 sprintf(cmdline, "/proc/%d/cmdline", pid);
76 nexttok(&ptr); // skip pid
133 ppid = pid;
134 pid = tid;
145 printf("%-9s %-5d %-5d %-6d %-5d", user, pid, ppid, vss / 1024, rss * 4);
152 if (get_sched_policy(pid,
173 ps_threads(int pid, char *namefilter) argument
230 int pid = atoi(de->d_name); local
[all...]
H A Dlsof.c48 pid_t pid; member in struct:pid_info_t
91 info->cmdline, info->pid, info->user, type,
123 info->cmdline, info->pid, info->user, "mem",
147 info->cmdline, info->pid, info->user, "FDS",
166 void lsof_dumpinfo(pid_t pid) argument
173 info.pid = pid;
174 snprintf(info.path, sizeof(info.path), "/proc/%d/", pid);
177 // Get the UID by calling stat on the proc/pid directory.
221 long int pid local
[all...]
/system/extras/tests/bionic/libc/common/
H A Dtest_clone.c62 int pid,child; local
65 pid = clone (clone_child, clone_stack + 3 * PAGE_SIZE,
67 if (pid < 0)
72 printf ("child pid %d\n", pid);
75 child = waitpid (pid, &status, 0);
H A Dtest_executable_destructor.c61 pid_t pid; local
80 pid = fork();
81 if (pid < 0) {
86 if (pid == 0) {
/system/core/debuggerd/arm/
H A Dpr-support.c50 pid_t pid);
86 next_unwind_byte_with_ptrace (__gnu_unwind_state * uws, pid_t pid) argument
96 uws->data = get_remote_word(pid, uws->next);
112 pid_t pid)
121 op = next_unwind_byte_with_ptrace (uws, pid);
153 op = (op << 8) | next_unwind_byte_with_ptrace (uws, pid);
162 pid)
189 pid)
199 op = next_unwind_byte_with_ptrace (uws, pid);
205 _UVRSD_UINT32, pid)
111 unwind_execute_with_ptrace(_Unwind_Context * context, __gnu_unwind_state * uws, pid_t pid) argument
[all...]
H A Dunwind.c176 pid_t pid);
187 pid_t pid)
208 vrs->core.r[i] = get_remote_word(pid, ptr);
228 selfrel_offset31 (const _uw *p, pid_t pid) argument
230 _uw offset = get_remote_word(pid, (void*)p);
248 pid_t pid)
263 this_fn = selfrel_offset31 (&table[n].fnoffset, pid);
265 next_fn = selfrel_offset31 (&table[n + 1].fnoffset, pid) - 1;
284 get_eitp(_uw return_address, pid_t pid, mapinfo *map, mapinfo **containing_map) argument
306 eitp = search_EIT_table (eitp, nrec, return_address, pid);
183 unwind_VRS_Pop_with_ptrace(_Unwind_Context *context, _Unwind_VRS_RegClass regclass, _uw discriminator, _Unwind_VRS_DataRepresentation representation, pid_t pid) argument
247 search_EIT_table(const __EIT_entry * table, int nrec, _uw return_address, pid_t pid) argument
316 get_eit_entry(_Unwind_Control_Block *ucbp, _uw return_address, pid_t pid, mapinfo *map, mapinfo **containing_map) argument
386 log_function(_Unwind_Context *context, pid_t pid, int tfd, int stack_level, mapinfo *map, unsigned int sp_list[], bool at_fault) argument
478 unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map, unsigned int sp_list[], int *frame0_pc_sane, bool at_fault) argument
574 unwind_pr_common_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, int id, pid_t pid) argument
643 unwind_cpp_pr0_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument
652 unwind_cpp_pr1_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument
661 unwind_cpp_pr2_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument
[all...]
H A Dmachine.c51 extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map,
62 static void show_nearby_maps(int tfd, int pid, mapinfo *map) argument
67 if (ptrace(PTRACE_GETSIGINFO, pid, 0, &si)) {
69 pid, strerror(errno));
107 * ascending order (like /proc/pid/maps).
130 static void dump_memory(int tfd, int pid, uintptr_t addr, argument
168 long data = ptrace(PTRACE_PEEKTEXT, pid, (void*)p, NULL);
193 void dump_stack_and_code(int tfd, int pid, mapinfo *map, argument
201 if(ptrace(PTRACE_GETREGS, pid, 0, &r)) return;
227 dump_memory(tfd, pid, add
317 dump_pc_and_lr(int tfd, int pid, mapinfo *map, int unwound_level, bool at_fault) argument
335 dump_registers(int tfd, int pid, bool at_fault) argument
[all...]
/system/core/adb/
H A Dbackup_service.c26 pid_t pid; member in struct:__anon272
44 waitpid(params->pid, &status, 0);
52 pid_t pid; local
80 pid = fork();
81 if (pid < 0) {
91 if (pid == 0) {
138 D("fork() returned pid %d\n", pid);
143 params->pid = pid;
[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.c41 int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio) { argument
43 if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) {
50 int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio) { argument
54 if ((rc = ioprio_get(WHO_PROCESS, pid)) < 0) {
H A Dzygote.c52 uint32_t pid;
137 // Read the pid, as a 4-byte network-order integer
139 ivs[0].iov_base = &pid;
140 ivs[0].iov_len = sizeof(pid);
156 pid = ntohl(pid);
158 return pid;
165 int pid; local
181 pid = send_request(fd, 1, argc + 1, newargv);
183 if (pid >
222 int pid; local
[all...]
/system/core/init/
H A Dsignal_handler.c46 pid_t pid; local
54 while ( (pid = waitpid(-1, &status, block ? 0 : WNOHANG)) == -1 && errno == EINTR );
55 if (pid <= 0) return -1;
56 INFO("waitpid returned pid %d, status = %08x\n", pid, status);
58 svc = service_find_by_pid(pid);
60 ERROR("untracked pid %d exited\n", pid);
64 NOTICE("process '%s', pid %d exited\n", svc->name, pid);
[all...]
/system/core/debuggerd/x86/
H A Dunwind.c7 int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map, argument
17 if(ptrace(PTRACE_GETREGS, pid, 0, &r)) return 0;
44 eip = ptrace(PTRACE_PEEKTEXT, pid, (void*)(ebp + 4), NULL);
45 ebp = ptrace(PTRACE_PEEKTEXT, pid, (void*)ebp, NULL);
55 stack_content = ptrace(PTRACE_PEEKTEXT, pid, (void*)stack_ptr, NULL);
81 ebp = ptrace(PTRACE_PEEKTEXT, pid, (void*)ebp, NULL);
/system/netd/
H A DPanController.cpp51 pid_t pid; local
71 if ((pid = fork()) < 0) {
76 if (!pid) {
84 mPid = pid;

Completed in 963 milliseconds

1234