Home
last modified time | relevance | path

Searched refs:Pr (Results 1 – 25 of 55) sorted by relevance

123

/illumos-gate/usr/src/lib/libproc/common/
H A Dpr_stat.c80 if (Pr == NULL) /* no subject process */ in pr_stat()
108 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) { in pr_stat()
134 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_stat()
155 if (Pr == NULL) /* no subject process */ in pr_lstat()
209 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_lstat()
230 if (Pr == NULL) /* no subject process */ in pr_fstat()
284 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_fstat()
305 if (Pr == NULL) /* no subject process */ in pr_stat64()
363 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_stat64()
384 if (Pr == NULL) /* no subject process */ in pr_lstat64()
[all …]
H A Dpr_getrlimit.c41 pr_getrlimit(struct ps_prochandle *Pr, in pr_getrlimit() argument
50 if (Pr == NULL) /* no subject process */ in pr_getrlimit()
68 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_getrlimit()
89 pr_setrlimit(struct ps_prochandle *Pr, in pr_setrlimit() argument
98 if (Pr == NULL) /* no subject process */ in pr_setrlimit()
116 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_setrlimit()
137 pr_getrlimit64(struct ps_prochandle *Pr, in pr_getrlimit64() argument
146 if (Pr == NULL) /* no subject process */ in pr_getrlimit64()
164 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_getrlimit64()
185 pr_setrlimit64(struct ps_prochandle *Pr, in pr_setrlimit64() argument
[all …]
H A Dpr_tasksys.c44 pr_getzoneid(struct ps_prochandle *Pr) in pr_getzoneid() argument
51 if (Pr == NULL) /* no subject process */ in pr_getzoneid()
68 error = Psyscall(Pr, &rval, SYS_zone, 2, &argd[0]); in pr_getzoneid()
78 pr_getprojid(struct ps_prochandle *Pr) in pr_getprojid() argument
85 if (Pr == NULL) /* no subject process */ in pr_getprojid()
95 error = Psyscall(Pr, &rval, SYS_tasksys, 1, &argd[0]); in pr_getprojid()
105 pr_gettaskid(struct ps_prochandle *Pr) in pr_gettaskid() argument
112 if (Pr == NULL) /* no subject process */ in pr_gettaskid()
122 error = Psyscall(Pr, &rval, SYS_tasksys, 1, &argd[0]); in pr_gettaskid()
139 if (Pr == NULL) /* No subject process */ in pr_settaskid()
[all …]
H A Dpr_getsockname.c40 get_sock_peer_name(struct ps_prochandle *Pr, in get_sock_peer_name() argument
76 error = Psyscall(Pr, &rval, syscall, 4, &argd[0]); in get_sock_peer_name()
94 pr_getsockname(struct ps_prochandle *Pr, in pr_getsockname() argument
97 if (Pr == NULL) /* no subject process */ in pr_getsockname()
107 pr_getpeername(struct ps_prochandle *Pr, in pr_getpeername() argument
110 if (Pr == NULL) /* no subject process */ in pr_getpeername()
117 pr_getsockopt(struct ps_prochandle *Pr, in pr_getsockopt() argument
125 if (Pr == NULL) /* no subject process */ in pr_getsockopt()
163 error = Psyscall(Pr, &rval, SYS_getsockopt, 5, &argd[0]); in pr_getsockopt()
184 if (Pr == NULL) /* no subject process */ in pr_getpeerucred()
[all …]
H A Dpr_open.c45 if (Pr == NULL) /* no subject process */ in pr_open()
76 error = Psyscall(Pr, &rval, SYS_openat, 4, &argd[0]); in pr_open()
89 pr_creat(struct ps_prochandle *Pr, const char *filename, mode_t mode) in pr_creat() argument
96 if (Pr == NULL) /* no subject process */ in pr_creat()
127 error = Psyscall(Pr, &rval, SYS_openat, 4, &argd[0]); in pr_creat()
140 pr_close(struct ps_prochandle *Pr, int fd) in pr_close() argument
147 if (Pr == NULL) /* no subject process */ in pr_close()
157 error = Psyscall(Pr, &rval, SYS_close, 1, &argd[0]); in pr_close()
170 pr_access(struct ps_prochandle *Pr, const char *path, int amode) in pr_access() argument
177 if (Pr == NULL) /* no subject process */ in pr_access()
[all …]
H A Dpr_statvfs.c65 pr_statvfs(struct ps_prochandle *Pr, const char *path, statvfs_t *buf) in pr_statvfs() argument
75 if (Pr == NULL) /* no subject process */ in pr_statvfs()
89 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) { in pr_statvfs()
101 error = Psyscall(Pr, &rval, SYS_statvfs, 2, &argd[0]); in pr_statvfs()
108 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_statvfs()
118 pr_fstatvfs(struct ps_prochandle *Pr, int fd, statvfs_t *buf) in pr_fstatvfs() argument
128 if (Pr == NULL) /* no subject process */ in pr_fstatvfs()
142 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) { in pr_fstatvfs()
154 error = Psyscall(Pr, &rval, SYS_fstatvfs, 2, &argd[0]); in pr_fstatvfs()
161 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) in pr_fstatvfs()
H A Dproc_set.c39 Psetcred(struct ps_prochandle *Pr, const prcred_t *credp) in Psetcred() argument
48 if (Pr == NULL || credp == NULL) in Psetcred()
58 if (write(Pctlfd(Pr), ctlp, sizeof (long) + ctlsize) < 0) in Psetcred()
70 Psetzoneid(struct ps_prochandle *Pr, zoneid_t zoneid) in Psetzoneid() argument
77 if (Pr == NULL) in Psetzoneid()
83 if (write(Pctlfd(Pr), &ctl, sizeof (ctl)) < 0) in Psetzoneid()
H A Dpr_lseek.c43 pr_lseek(struct ps_prochandle *Pr, int filedes, off_t offset, int whence) in pr_lseek() argument
53 if (Pr == NULL) in pr_lseek()
64 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_NATIVE) { in pr_lseek()
96 error = Psyscall(Pr, &rval, syscall, nargs, &argd[0]); in pr_lseek()
103 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_NATIVE) in pr_lseek()
118 pr_llseek(struct ps_prochandle *Pr, int filedes, offset_t offset, int whence) in pr_llseek() argument
128 if (Pr == NULL) in pr_llseek()
139 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_LP64) { in pr_llseek()
171 error = Psyscall(Pr, &rval, syscall, nargs, &argd[0]); in pr_llseek()
178 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_LP64) in pr_llseek()
H A Dpr_meminfo.c40 pr_meminfo(struct ps_prochandle *Pr, const uint64_t *addrs, in pr_meminfo() argument
71 if ((totalmap = pr_zmap(Pr, 0, totalsize, PROT_READ | PROT_WRITE, in pr_meminfo()
85 if (Pwrite(Pr, addrs, inarraysize, inaddr) != inarraysize) { in pr_meminfo()
90 if (Pwrite(Pr, info, infoarraysize, infoaddr) != in pr_meminfo()
97 model = Pr->status.pr_dmodel; in pr_meminfo()
156 error = Psyscall(Pr, &rval, SYS_meminfosys, 3, &argd[0]); in pr_meminfo()
165 if ((Pread(Pr, outdata, outarraysize, outaddr)) != outarraysize) { in pr_meminfo()
170 if (Pread(Pr, validity, validityarraysize, validityaddr) in pr_meminfo()
181 pr_munmap(Pr, totalmap, totalsize) == -1) { in pr_meminfo()
H A Dpr_exit.c39 pr_exit(struct ps_prochandle *Pr, int status) in pr_exit() argument
46 if (Pr == NULL) { /* no subject process */ in pr_exit()
58 error = Psyscall(Pr, &rval, SYS_exit, 1, &argd[0]); in pr_exit()
82 pr_lwp_exit(struct ps_prochandle *Pr) in pr_lwp_exit() argument
87 if (Pr == NULL) { /* no subject process */ in pr_lwp_exit()
92 error = Psyscall(Pr, &rval, SYS_lwp_exit, 0, NULL); in pr_lwp_exit()
H A Dpr_mmap.c39 pr_mmap(struct ps_prochandle *Pr, in pr_mmap() argument
47 if (Pr == NULL) /* no subject process */ in pr_mmap()
92 error = Psyscall(Pr, &rval, SYS_mmap, 6, &argd[0]); in pr_mmap()
105 pr_munmap(struct ps_prochandle *Pr, void *addr, size_t len) in pr_munmap() argument
112 if (Pr == NULL) /* no subject process */ in pr_munmap()
129 error = Psyscall(Pr, &rval, SYS_munmap, 2, &argd[0]); in pr_munmap()
142 pr_zmap(struct ps_prochandle *Pr, void *addr, size_t len, int prot, int flags) in pr_zmap() argument
144 return (pr_mmap(Pr, addr, len, prot, flags | MAP_ANON, -1, (off_t)0)); in pr_zmap()
H A Dpr_rename.c36 pr_rename(struct ps_prochandle *Pr, const char *old, const char *new) in pr_rename() argument
43 if (Pr == NULL) in pr_rename()
74 error = Psyscall(Pr, &rval, SYS_renameat, 4, &argd[0]); in pr_rename()
87 pr_link(struct ps_prochandle *Pr, const char *existing, const char *new) in pr_link() argument
94 if (Pr == NULL) in pr_link()
132 error = Psyscall(Pr, &rval, SYS_linkat, 5, &argd[0]); in pr_link()
145 pr_unlink(struct ps_prochandle *Pr, const char *path) in pr_unlink() argument
152 if (Pr == NULL) in pr_unlink()
176 error = Psyscall(Pr, &rval, SYS_unlinkat, 3, &argd[0]); in pr_unlink()
H A Dpr_getitimer.c39 pr_getitimer(struct ps_prochandle *Pr, int which, struct itimerval *itv) in pr_getitimer() argument
46 int victim32 = (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32); in pr_getitimer()
50 if (Pr == NULL) /* no victim process */ in pr_getitimer()
77 error = Psyscall(Pr, &rval, SYS_getitimer, 2, &argd[0]); in pr_getitimer()
95 pr_setitimer(struct ps_prochandle *Pr, in pr_setitimer() argument
103 int victim32 = (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32); in pr_setitimer()
108 if (Pr == NULL) /* no victim process */ in pr_setitimer()
160 error = Psyscall(Pr, &rval, SYS_setitimer, 3, &argd[0]); in pr_setitimer()
/illumos-gate/usr/src/cmd/ptools/pldd/
H A Dpldd.c101 struct ps_prochandle *Pr; in main() local
105 if ((Pr = proc_arg_grab(arg = *argv++, PR_ARG_ANY, in main()
114 (void) memcpy(&psinfo, Ppsinfo(Pr), sizeof (psinfo_t)); in main()
117 if (Pstate(Pr) == PS_DEAD) { in main()
118 if ((Pcontent(Pr) & content) != content) { in main()
131 if (Pgetauxval(Pr, AT_BASE) != -1L && Prd_agent(Pr) == NULL) { in main()
138 rc += Pobject_iter(Pr, show_map, Pr); in main()
140 rc += Pobject_iter_resolved(Pr, show_map, Pr); in main()
141 Prelease(Pr, 0); in main()
152 struct ps_prochandle *Pr = cd; in show_map() local
[all …]
/illumos-gate/usr/src/cmd/ptools/pfiles/
H A Dpfiles.c151 Prelease(Pr, 0); in main()
157 show_files(Pr); in main()
158 Prelease(Pr, 0); in main()
165 show_files(Pr); in main()
166 Pdestroy_agent(Pr); in main()
173 Prelease(Pr, 0); in main()
174 Pr = NULL; in main()
269 dofcntl(Pr, info, in show_file()
279 dofifo(Pr, info); in show_file()
318 (void) Pfdinfo_iter(Pr, show_file, Pr); in show_files()
[all …]
/illumos-gate/usr/src/cmd/plimit/
H A Dplimit.c95 struct ps_prochandle *Pr; in main() local
180 if (Pcreate_agent(Pr) == 0) { in main()
182 if (set_limits(Pr) != 0) in main()
188 show_limits(Pr); in main()
190 Pdestroy_agent(Pr); in main()
197 Prelease(Pr, 0); in main()
389 show_limits(struct ps_prochandle *Pr) in show_limits() argument
536 if (Psetflags(Pr, PR_KLC) != 0 || in set_one_limit()
542 (void) Punsetflags(Pr, PR_KLC); in set_one_limit()
565 Pdestroy_agent(Pr); in set_one_limit()
[all …]
/illumos-gate/usr/src/cmd/ppgsz/
H A Dppgsz.c55 static struct ps_prochandle *Pr; variable
258 if (Pr == NULL) { in main()
291 if ((rc = setpgsz(Pr, Pstatus(Pr)->pr_dmodel, pgsz)) != 0) { in main()
294 (void) pr_exit(Pr, 1); in main()
302 Prelease(Pr, 0); in main()
344 rc = setpgsz(Pr, Pstatus(Pr)->pr_dmodel, pgsz); in main()
350 Prelease(Pr, 0); in main()
351 Pr = NULL; in main()
456 if ((psinfo = Ppsinfo(Pr)) == NULL) in setpgsz_anon()
458 if ((pstatus = Pstatus(Pr)) == NULL) in setpgsz_anon()
[all …]
/illumos-gate/usr/src/lib/libpctx/common/
H A Dlibpctx.c55 struct ps_prochandle *Pr; member
378 if (pctx->Pr == NULL) in pctx_begin_syscalls()
389 if (pctx->Pr == NULL) in pctx_end_syscalls()
415 pstatus = Pstatus(pctx->Pr); in pctx_lwpiterate()
467 if (pctx->Pr) { in pctx_free()
468 Pfree(pctx->Pr); in pctx_free()
469 pctx->Pr = NULL; in pctx_free()
480 if (pctx->Pr) { in pctx_release()
482 pctx->Pr = NULL; in pctx_release()
635 (void) Preopen(pctx->Pr); in pctx_run()
[all …]
/illumos-gate/usr/src/cmd/ptools/pstack/
H A Dpstack.c235 Prelease(Pr, 0); in main()
242 if (Pstate(Pr) == PS_DEAD) { in main()
258 if (Pgetauxval(Pr, AT_BASE) != -1L && Prd_agent(Pr) == NULL) { in main()
285 handle.proc = Pr; in main()
286 handle.jvm = load_libjvm(Pr); in main()
298 Prelease(Pr, 0); in main()
477 print_zombie(Pr, tip); in all_call_stacks()
586 if (Plookup_by_addr(Pr, pc, in print_frame()
712 struct ps_prochandle *Pr = cd; in jvm_object_iter() local
762 (void) Pobject_iter(Pr, jvm_object_iter, Pr); in load_libjvm()
[all …]
/illumos-gate/usr/src/cmd/ptools/psig/
H A Dpsig.c111 uberdata_addr(struct ps_prochandle *Pr, char dmodel) in uberdata_addr() argument
122 if (Pread(Pr, &addr, sizeof (addr), sym.st_value) in uberdata_addr()
135 if (Pread(Pr, &addr, sizeof (addr), sym.st_value) in uberdata_addr()
138 Pread(Pr, &uaddr, sizeof (uaddr), addr) in uberdata_addr()
182 struct ps_prochandle *Pr = NULL; in look() local
229 (void) Plwp_iter(Pr, lwp_iter, &holdmask); in look()
242 (void) Pread(Pr, &addr, sizeof (addr), in look()
251 (void) Pread(Pr, &intfnaddr, sizeof (intfnaddr), in look()
319 Plookup_by_addr(Pr, haddr, hname, in look()
351 if (Pr) in look()
[all …]
/illumos-gate/usr/src/cmd/ptools/pmap/
H A Dpmap.c150 static struct ps_prochandle *Pr; variable
360 if (Pstate(Pr) != PS_DEAD) { in main()
368 Prelease(Pr, prr_flags); in main()
378 if (Pstate(Pr) == PS_DEAD) { in main()
387 Prelease(Pr, prr_flags); in main()
405 if (Pstate(Pr) != PS_DEAD) { in main()
407 Prelease(Pr, prr_flags); in main()
416 Prelease(Pr, prr_flags); in main()
437 Prd_agent(Pr) == NULL) { in main()
459 rc += Pmapping_iter(Pr, in main()
[all …]
/illumos-gate/usr/src/cmd/pbind/
H A Dpbind.c186 struct ps_prochandle *Pr; in grab_proc() local
199 if (Psetflags(Pr, PR_RLC) != 0 || Pcreate_agent(Pr) != 0) { in grab_proc()
202 Prelease(Pr, 0); in grab_proc()
205 return (Pr); in grab_proc()
209 rele_proc(struct ps_prochandle *Pr) in rele_proc() argument
211 if (Pr == NULL) in rele_proc()
213 Pdestroy_agent(Pr); in rele_proc()
214 Prelease(Pr, 0); in rele_proc()
240 struct ps_prochandle *Pr; in do_lwps() local
292 bind_lwp(Pr, pid, lwp->pr_lwpid, cpu); in do_lwps()
[all …]
/illumos-gate/usr/src/cmd/ptools/preap/
H A Dpreap.c106 struct ps_prochandle *Pr; in reap() local
155 if ((Pr = Pgrab(ppid, Fflag | PGRAB_NOSTOP, &gret)) == NULL) { in reap()
161 if ((Fflag == 0) && (Pstate(Pr) == PS_STOP)) { in reap()
162 Prelease(Pr, 0); in reap()
175 if (Pstop(Pr, 1000) != 0) { in reap()
176 Prelease(Pr, 0); in reap()
182 if (pr_waitid(Pr, P_PID, pid, &siginfo, WEXITED|WNOHANG) != 0) { in reap()
183 Prelease(Pr, 0); in reap()
189 Prelease(Pr, 0); in reap()
/illumos-gate/usr/src/cmd/ptools/ppriv/
H A Dppriv.c187 Prelease(Pr, 0); in look()
203 Prelease(Pr, 0); in look()
204 Ppriv_free(Pr, ppriv); in look()
212 Prelease(Pr, 0); in look()
216 Prelease(Pr, 0); in look()
217 Ppriv_free(Pr, ppriv); in look()
223 arg, (int)Ppsinfo(Pr)->pr_pid, Ppsinfo(Pr)->pr_psargs); in look()
224 pdata = Pprivinfo(Pr); in look()
228 (int)Ppsinfo(Pr)->pr_pid, Ppsinfo(Pr)->pr_psargs); in look()
291 Prelease(Pr, 0); in look()
[all …]
/illumos-gate/usr/src/cmd/ptools/pcred/
H A Dpcred.c158 struct ps_prochandle *Pr; in look() local
173 if ((Pr = proc_arg_grab(arg, doset ? PR_ARG_PIDS : PR_ARG_ANY, in look()
181 if (Pcred(Pr, prcred, ngroups_max) == -1) { in look()
183 Prelease(Pr, 0); in look()
189 if (Psetcred(Pr, prcred) != 0) { in look()
191 Prelease(Pr, 0); in look()
194 Prelease(Pr, 0); in look()
198 if (Pstate(Pr) == PS_DEAD) in look()
199 (void) printf("core of %d:\t", (int)Pstatus(Pr)->pr_pid); in look()
201 (void) printf("%d:\t", (int)Pstatus(Pr)->pr_pid); in look()
[all …]

123