From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 20 05:10:12 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84E351065670 for ; Sat, 20 Dec 2008 05:10:12 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 36B478FC08 for ; Sat, 20 Dec 2008 05:10:12 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so736974anc.13 for ; Fri, 19 Dec 2008 21:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=hqAR7k6QdSV42QYiGXz49D8E068YNsZdKg3oXYRNh+8=; b=PWsefk5OThzHDYnc8WQKpitFznRMJIhJYFPY4N/XExplzxj6bs3UnFYE5zSNgkS3BY s61/frd+QkvHQPU2/pDTbbuI0JFrlc3sGYpShZ3Ey+1Rbqjuks+ijj9zADPezEHFEEki 1f8RBtb/li3l/6jerTOOdceL7Lj7PhKUSR8Lk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=SUeQVtcRblbj6FdpHKu9X6by/kW5xwNNqA6d7gYyUg8CvQcnQOzcxkOs052GadSCK0 H+Yio2dkmEyI1eBqSVHazT/Eq8BcyGaqyXX+h3jj+DhZLLPFNkkcDR5bhlM+P47OgXuv bZ1VeSMknv+Sqyj3Nsg1fhoWDQEyJP3W1ASa4= Received: by 10.101.70.15 with SMTP id x15mr2695661ank.112.1229747963441; Fri, 19 Dec 2008 20:39:23 -0800 (PST) Received: from ?192.168.2.2? (cpe-70-112-179-136.austin.res.rr.com [70.112.179.136]) by mx.google.com with ESMTPS id b32sm8068057ana.54.2008.12.19.20.39.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 20:39:23 -0800 (PST) From: Ferner Cilloniz To: freebsd-hackers@freebsd.org Content-Type: text/plain Date: Fri, 19 Dec 2008 22:39:20 +0000 Message-Id: <1229726360.5614.15.camel@mobiliare.Belkin> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Subject: adding proc to allproc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2008 05:10:12 -0000 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.