From owner-freebsd-hackers@FreeBSD.ORG Tue May 15 11:37:58 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 015B116A400 for ; Tue, 15 May 2007 11:37:58 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from customer-domains.icp-qv1-irony14.iinet.net.au (customer-domains.icp-qv1-irony14.iinet.net.au [203.59.1.169]) by mx1.freebsd.org (Postfix) with ESMTP id 781DC13C469 for ; Tue, 15 May 2007 11:37:56 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from 203-214-83-168.dyn.iinet.net.au (HELO [172.16.7.12]) ([203.214.83.168]) by iinet-mail.icp-qv1-irony14.iinet.net.au with ESMTP; 15 May 2007 19:08:00 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKEwSUbL1lOodGdsb2JhbAANj3Q3 X-IronPort-AV: i="4.14,536,1170601200"; d="scan'208"; a="87582869:sNHT13963488" Message-ID: <46499491.2010205@room52.net> Date: Tue, 15 May 2007 21:08:01 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Marc_L=F6rner?= References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> In-Reply-To: <200705150847.38838.marc.loerner@hob.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space 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: Tue, 15 May 2007 11:37:58 -0000 Hi Marc, Marc Lörner wrote: [snip] > > BTW, you can get an thread-struct pointer from curthread (c.f. sys/pcpu.h). > [snip] Thanks very much for the reply. "curthread" is the missing key that I've been looking for! Thank you so much. I've been banging my head against a brick wall for days now. I'll have a play around and report back to the list what I find for archival purposes. Cheers, Lawrence PS Just found a thread I hadn't found before (http://lists.freebsd.org/pipermail/freebsd-hackers/2006-March/015647.html) which has lots of useful info and a link (http://people.freebsd.org/~pjd/misc/kernio/) to some sample code!