/system/vold/ |
H A D | Process.h | 24 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 D | Process.cpp | 66 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 D | iosched_policy.h | 31 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/toolbox/ |
H A D | ionice.c | 14 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 D | renice.c | 42 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 D | kill.c | 23 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 D | schedtop.c | 16 int pid; member in struct:thread_info 92 static void add_thread(int pid, int tid, struct thread_info *proc_info) argument 102 info->pid = pid; 106 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid); 108 sprintf(line, "/proc/%d/schedstat", pid); 121 sprintf(line, "/proc/%d/cmdline", pid); 129 sprintf(line, "/proc/%d/task/%d/stat", pid, tid); 131 sprintf(line, "/proc/%d/stat", pid); 153 static void add_threads(int pid, struc argument 170 print_threads(int pid, uint32_t flags) argument 201 int pid = atoi(de->d_name); local 229 int pid = last_processes.data[i].pid; local [all...] |
H A D | ps.c | 33 static int ps_line(int pid, int tid, char *namefilter) argument 47 sprintf(statline, "/proc/%d", pid); 51 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); 54 sprintf(statline, "/proc/%d/stat", pid); 55 sprintf(cmdline, "/proc/%d/cmdline", pid); 75 nexttok(&ptr); // skip pid 132 ppid = pid; 133 pid = tid; 144 printf("%-9s %-5d %-5d %-6d %-5d", user, pid, ppid, vss / 1024, rss * 4); 149 if (get_sched_policy(pid, 170 ps_threads(int pid, char *namefilter) argument 224 int pid = atoi(de->d_name); local [all...] |
H A D | lsof.c | 44 pid_t pid; member in struct:pid_info_t 85 printf("%-9s %5d %10s %4s %9s %18s %9s %10s %s\n", info->cmdline, info->pid, "???", type, 116 printf("%-9s %5d %10s %4s %9s %18s %9zd %10ld %s\n", info->cmdline, info->pid, "???", "mem", 139 printf("%-9s %5d %10s %4s %9s %18s %9s %10s %s\n", info->cmdline, info->pid, "???", "FDS", 158 void lsof_dumpinfo(pid_t pid) argument 162 info.pid = pid; 164 snprintf(info.path, sizeof(info.path), "/proc/%d/", pid); 214 long int pid = strtol(de->d_name, &endptr, 10); local 218 lsof_dumpinfo(pid); [all...] |
/system/extras/tests/bionic/libc/common/ |
H A D | test_clone.c | 35 int pid,child; local 38 pid = clone (clone_child, clone_stack + 3 * PAGE_SIZE, 40 if (pid < 0) 45 printf ("child pid %d\n", pid); 48 child = waitpid (pid, &status, 0);
|
/system/wlan/ti/sta_dk_4_0_4_32/CUDK/CLI/ |
H A D | ipc.c | 123 int pid = getpid(); local 127 /* The pid of the caller process is inserted, so the main process */ 136 command[0] = (pid & 0x00FF); 137 command[1] = ((pid & 0xFF00) >> 8); 143 command[0] = (pid & 0x00FF); 144 command[1] = ((pid & 0xFF00) >> 8);
|
/system/core/debuggerd/ |
H A D | pr-support.c | 50 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 D | unwind-arm.c | 174 pid_t pid); 185 pid_t pid) 206 vrs->core.r[i] = get_remote_word(pid, ptr); 226 selfrel_offset31 (const _uw *p, pid_t pid) argument 228 _uw offset = get_remote_word(pid, (void*)p); 246 pid_t pid) 261 this_fn = selfrel_offset31 (&table[n].fnoffset, pid); 263 next_fn = selfrel_offset31 (&table[n + 1].fnoffset, pid) - 1; 282 get_eitp(_uw return_address, pid_t pid, mapinfo *map, mapinfo **containing_map) argument 304 eitp = search_EIT_table (eitp, nrec, return_address, pid); 181 unwind_VRS_Pop_with_ptrace(_Unwind_Context *context, _Unwind_VRS_RegClass regclass, _uw discriminator, _Unwind_VRS_DataRepresentation representation, pid_t pid) argument 245 search_EIT_table(const __EIT_entry * table, int nrec, _uw return_address, pid_t pid) argument 314 get_eit_entry(_Unwind_Control_Block *ucbp, _uw return_address, pid_t pid, mapinfo *map, mapinfo **containing_map) argument 384 log_function(_Unwind_Context *context, pid_t pid, int tfd, int stack_level, mapinfo *map, unsigned int sp_list[], bool at_fault) argument 465 unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map, unsigned int sp_list[], int *frame0_pc_sane, bool at_fault) argument 561 unwind_pr_common_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, int id, pid_t pid) argument 630 unwind_cpp_pr0_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument 639 unwind_cpp_pr1_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument 648 unwind_cpp_pr2_with_ptrace(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context, pid_t pid) argument [all...] |
H A D | utility.c | 26 /* Get a word from pid using ptrace. The result is the return value. */ 27 int get_remote_word(int pid, void *src) argument 29 return ptrace(PTRACE_PEEKTEXT, pid, src, NULL); 33 /* Handy routine to read aggregated data from pid using ptrace. The read 36 void get_remote_struct(int pid, void *src, void *dst, size_t size) argument 41 *(int *)(dst+i) = ptrace(PTRACE_PEEKTEXT, pid, src+i, NULL); 48 val = ptrace(PTRACE_PEEKTEXT, pid, src+i, NULL);
|
H A D | utility.h | 39 /* Get a word from pid using ptrace. The result is the return value. */ 40 extern int get_remote_word(int pid, void *src); 42 /* Handy routine to read aggregated data from pid using ptrace. The read 45 extern void get_remote_struct(int pid, void *src, void *dst, size_t size);
|
H A D | debuggerd.c | 54 extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map, 129 void dump_stack_and_code(int tfd, int pid, mapinfo *map, argument 139 if(ptrace(PTRACE_GETREGS, pid, 0, &r)) return; 159 data = ptrace(PTRACE_PEEKTEXT, pid, (void*)p, NULL); 183 data = ptrace(PTRACE_PEEKTEXT, pid, (void*)p, NULL); 221 data = ptrace(PTRACE_PEEKTEXT, pid, (void*)p, NULL); 242 data = ptrace(PTRACE_PEEKTEXT, pid, (void*)p, NULL); 250 void dump_pc_and_lr(int tfd, int pid, mapinfo *map, int unwound_level, argument 255 if(ptrace(PTRACE_GETREGS, pid, 0, &r)) { 256 _LOG(tfd, !at_fault, "tid %d not responding!\n", pid); 268 dump_registers(int tfd, int pid, bool at_fault) argument 365 dump_fault_addr(int tfd, int pid, int sig) argument 380 dump_crash_banner(int tfd, unsigned pid, unsigned tid, int sig) argument 402 parse_exidx_info(mapinfo *milist, pid_t pid) argument 436 dump_crash_report(int tfd, unsigned pid, unsigned tid, bool at_fault) argument 554 dump_sibling_thread_report(int tfd, unsigned pid, unsigned tid) argument 591 engrave_tombstone(unsigned pid, unsigned tid, int debug_uid, int signal) argument [all...] |
/system/extras/tests/cpueater/ |
H A D | cpueater.c | 30 pid_t pid; local 45 switch(pid = fork()) { 69 printf("%d\n", pid);
|
H A D | daemonize.c | 33 int pid, fd, mode; local 84 switch(pid = fork()) { 104 switch(pid = fork()) { 117 waitpid(pid, &status, 0);
|
/system/core/libcutils/ |
H A D | iosched_policy.c | 41 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 D | zygote.c | 52 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...] |
H A D | mq.c | 50 pid_t pid; member in struct:__anon83 59 typedef void DeathListener(pid_t pid); 130 pid_t pid; member in struct:__anon89 133 * Map from pid to peer proxy. The peer has a peer proxy for each remote 195 * which the peer has been connected to. Maps pid to PeerProxy. Helps 231 pid_t* pid = (pid_t*) key; local 232 return (int) (*pid); 348 static bool peerIsDead(Peer* peer, pid_t pid) { argument 355 if (deadPeer == pid) { 368 hashmapRemove(otherPeer->connections, &(deadPeer->credentials.pid)); 389 pid_t pid = peerProxy->credentials.pid; local 601 peerProxyGetOrCreate(Peer* peer, pid_t pid, bool requestConnection) argument 685 pid_t pid = header->credentials.pid; local 898 pid_t pid = header->credentials.pid; local 1019 pid_t* pid = &(peerProxy->credentials.pid); local 1133 peerSendBytes(pid_t pid, const char* bytes, size_t size) argument 1200 peerSendSharedBytes(pid_t pid, char* bytes, size_t size, void (*free)(void* context), void* context) argument [all...] |
/system/wlan/ti/wilink_6_1/platforms/os/linux/inc/ |
H A D | tracebuf.h | 46 #define TB_ID current->pid
|
/system/core/init/ |
H A D | signal_handler.c | 46 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/netd/ |
H A D | PanController.cpp | 48 pid_t pid; local 68 if ((pid = fork()) < 0) { 73 if (!pid) { 81 mPid = pid;
|
/system/extras/latencytop/ |
H A D | latencytop.c | 44 static struct latency_entry *read_process_stats(struct latency_entry *list, int erase, int pid); 45 static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal); 71 int pid, tid; local 77 pid = tid = 0; 105 pid = atoi(argv[++i]); 121 if (tid && !pid) { 145 if (pid) { 147 e = read_thread_stats(e, erase, pid, tid, 1); 149 e = read_process_stats(e, erase, pid); 157 if (pid) { 201 read_process_stats(struct latency_entry *list, int erase, int pid) argument 231 read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal) argument [all...] |