From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 3 17:43:40 2011 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 4DC87106566C for ; Sat, 3 Dec 2011 17:43:40 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 214858FC15 for ; Sat, 3 Dec 2011 17:43:39 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id pB3Hhb70085706 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 3 Dec 2011 09:43:38 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4EDA5FD7.9030903@freebsd.org> Date: Sat, 03 Dec 2011 09:43:51 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.24) Gecko/20111103 Thunderbird/3.1.16 MIME-Version: 1.0 To: Filippo Sironi References: <11076.1322906459@critter.freebsd.dk> <0011FD6A-E29D-4F67-913C-897BA1B2F56F@gmail.com> In-Reply-To: <0011FD6A-E29D-4F67-913C-897BA1B2F56F@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Poul-Henning Kamp Subject: Re: mmap implementation for cdev 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, 03 Dec 2011 17:43:40 -0000 On 12/3/11 2:37 AM, Filippo Sironi wrote: > I need to access the memory both from user space and kernel space, I cannot do that (simply) with an mmap or thread-specific storage if I recall correctly. that's how mmap works.. if you give it pages to expose to the user, you can still access them from in the kernel. you just have to make the threads in user land access different addresses. > On 03/dic/2011, at 11.00, Poul-Henning Kamp wrote: > >> In message, Filippo Sironi wri >> tes: >> >> Why don't you just use mmap(2) ? I couldn't see anything you >> couldn't do with it. >> >> There's also support in pthread for thread specific storage, which >> should be your first choice. >> >> >> -- >> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 >> phk@FreeBSD.ORG | TCP/IP since RFC 956 >> FreeBSD committer | BSD since 4.3-tahoe >> Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > 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" > >