From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 20 05:28:50 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 ABC821065674 for ; Sat, 20 Dec 2008 05:28:50 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE4E8FC12 for ; Sat, 20 Dec 2008 05:28:50 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so737947anc.13 for ; Fri, 19 Dec 2008 21:28:49 -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:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=6zyAnaUrjvpu52Xd+HnuybnWeH7SY6MziF3+wriT0XY=; b=IFpnNHQH6An691n99u55hVMgV57fbk+pHdaOOXZ+U4cyfFFnnEVP3NVuHSlWPH5IPC vsoumvVn8+IPhGjWpqNIm1nPEucnby+iNNfG+AcsqdPapyBdqFcPc1HohWX16/Aod1JT IS0t/HWfT4HvXTzF7t/oPjVcSq4YG4LBuWx+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=VbDKXYecQjtD06rwDyWagAZdBBGbMHR/Mbcj2w/UHTxqOw7rJBR68Eww23vnSPDZLm EhmtdFCf03uwStks6AKvPpt54PnYvH0mo3OicYhiZfWhVsCKOet/XHoQOU3YoUu/rYtn ys8jbqNTbhNu3hizhRwxAavBmlppjBVdKpFDM= Received: by 10.100.44.4 with SMTP id r4mr2716739anr.100.1229750929245; Fri, 19 Dec 2008 21:28:49 -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 c37sm7135824ana.37.2008.12.19.21.28.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 21:28:48 -0800 (PST) From: Ferner Cilloniz To: Julian Elischer In-Reply-To: <494C8246.3020703@elischer.org> References: <1229726360.5614.15.camel@mobiliare.Belkin> <494C8246.3020703@elischer.org> Content-Type: text/plain Date: Fri, 19 Dec 2008 23:28:46 +0000 Message-Id: <1229729326.5614.16.camel@mobiliare.Belkin> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: 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:28:50 -0000 When i run the code from a KLD it hangs the system. No reboot occurs however, it just hangs there. On Fri, 2008-12-19 at 21:27 -0800, Julian Elischer wrote: > Ferner Cilloniz wrote: > > 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. > > and your question is? > > > > > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Cilloniz Bicchi, Ferner Research Assistant Dept. of Computer Sciences The University of Texas at Austin http://www.cs.utexas.edu/~fernercc fernercc@cs.utexas.edu