From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 4 09:56:51 2009 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 21DED106566B for ; Tue, 4 Aug 2009 09:56:51 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id D95F08FC14 for ; Tue, 4 Aug 2009 09:56:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4F7251CEB2; Tue, 4 Aug 2009 11:56:50 +0200 (CEST) Date: Tue, 4 Aug 2009 11:56:50 +0200 From: Ed Schouten To: Maslan Message-ID: <20090804095650.GP1292@hoeg.nl> References: <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com> <86k51k4kvl.fsf@ds4.des.no> <86fxc84ksj.fsf@ds4.des.no> <200908040138.14743.max@love2party.net> <319cceca0908040227hf9a0f92jbf05b11e9f974994@mail.gmail.com> <20090804093036.GN1292@hoeg.nl> <319cceca0908040239k2accd7fen402db4c91687a267@mail.gmail.com> <20090804094142.GO1292@hoeg.nl> <319cceca0908040252w105d3dfdge9dec3c8b6d28607@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iFtobK8oO579scb0" Content-Disposition: inline In-Reply-To: <319cceca0908040252w105d3dfdge9dec3c8b6d28607@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers Subject: Re: sosend() and mbuf 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, 04 Aug 2009 09:56:51 -0000 --iFtobK8oO579scb0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Maslan wrote: > > Is it possible to call kern_open() from within a kernel thread anyway? > I think yes, It worked on the parent thread before creating a new kthread. > See OpenKETA source, its using the same approach. > > kern_open() depends on a file descriptor table, right? > Yes, it returns a fd in the curthread->td_retval[0], which i should > use within the same thread to deal with this file. Didn't someone (Jeff Roberson?) develop some nice in-kernel API for accessing files some years ago? Why not use that? --=20 Ed Schouten WWW: http://80386.nl/ --iFtobK8oO579scb0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkp4BeIACgkQ52SDGA2eCwWragCfVTbU06SSmeNPwjzE696vL082 ALYAnicAMU9a8zM5yJIS19hsqxtieqel =IkLo -----END PGP SIGNATURE----- --iFtobK8oO579scb0--