Displaying 3 results from an estimated 3 matches for "p_stat".
Did you mean:
c_stat
2006 Mar 02
1
Failing to understand getrusage()
I'm failing to understand how getrusage() works, which is a bit perplexing,
because it doesn't seem like it would be terribly complicated.
I've attached the code. My aim is to verify that I can use getrusage() to
do (admittedly crude) instrumentation of which functions in my program are
allocating lots of memory[1]. So I figure I can call getrusage() at various
points and look at
2003 Apr 08
0
Panic dereferencing p->p_leader during exit1()
...15c0dd in exit1 (p=0xe18f0c60, rv=41)
at /usr/src/sys/kern/kern_exit.c:190
190 if(p->p_leader->p_peers) {
(kgdb) p *p
$1 = {p_procq = {tqe_next = 0x0, tqe_prev = 0xc0318c88}, p_list = {
le_next = 0xe18f0ac0, le_prev = 0xc0318bc0}, p_cred = 0xc1fb28c0,
p_fd = 0xc2060900, p_stats = 0xe18e9cd0, p_limit = 0xc2059900,
p_upages_obj = 0xe18e3f00, p_procsig = 0xc2053040, p_flag = 24580,
p_stat = 2 '\002', p_pad1 = "\000\000", p_pid = 213, p_hash = {
le_next = 0x0, le_prev = 0xc104b354}, p_pglist = {le_next = 0x0,
le_prev = 0xe18f0afc}, p_pptr = 0...
2003 Sep 27
8
Patch for boot-time USB hangs in 4.9-PRERELEASE
...++ kern_fork.c 26 Sep 2003 08:26:31 -0000
@@ -183,7 +183,7 @@
struct proc *p2, *pptr;
uid_t uid;
struct proc *newproc;
- int ok;
+ int ok, s;
static int curfail = 0, pidchecked = 0;
static struct timeval lastfail;
struct forklist *ep;
@@ -544,10 +544,10 @@
*/
microtime(&(p2->p_stats->p_start));
p2->p_acflag = AFORK;
- (void) splhigh();
+ s = splhigh();
p2->p_stat = SRUN;
setrunqueue(p2);
- (void) spl0();
+ splx(s);
/*
* Now can be swapped.