Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2008 22:39:20 +0000
From:      Ferner Cilloniz <fernercc@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   adding proc to allproc
Message-ID:  <1229726360.5614.15.camel@mobiliare.Belkin>

next in thread | raw e-mail | index | archive | help
Hello everyone.

I am playing with freebsd and just learning some things about the
FreeBSD kernel. 

So for my first quest i am placing random processes from the allproc
list into a list of my own and trying to add them back into allproc

I have pasted the code below.

-----------------------------------------------------------------------
struct proc *p = a process from my own list;
if( p != NULL && (p->p_state == PRS_NEW || p->p_state == PRS_NORMAL) ){
       LIST_INSERT_HEAD(&allproc, p, p_list);
}
-----------------------------------------------------------------------

Thanks.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1229726360.5614.15.camel>