From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 3 10:38:16 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 1FAED106564A for ; Sat, 3 Dec 2011 10:38:16 +0000 (UTC) (envelope-from filippo.sironi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3D28FC0A for ; Sat, 3 Dec 2011 10:38:15 +0000 (UTC) Received: by bkat2 with SMTP id t2so5653432bka.13 for ; Sat, 03 Dec 2011 02:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=+kp61R6MShXXcktAvj2iBntQwy50XDd9v5Z4LWuzlVY=; b=VT80ecOkULMP6BHyghry6q5t7Ctcr5nm5SWMDOU0pYy0Qv1rEAmIN9hEbD+70U3E8D F6fEUVbKBO0N50ZxN+I25ZO3DGhrkZXz12UQBoSbut1DByaCJGIvsDPPxpP2RtSyOYFy 6Ret8kxUd7HcyUIpCPKUqmKmElblXB+oZt+r4= Received: by 10.204.155.141 with SMTP id s13mr895087bkw.40.1322908694373; Sat, 03 Dec 2011 02:38:14 -0800 (PST) Received: from filippo.sironi.dynamic.micro.elet.polimi.it (micro.elet.polimi.it. [131.175.127.118]) by mx.google.com with ESMTPS id p13sm21095883bkd.4.2011.12.03.02.38.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Dec 2011 02:38:13 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Filippo Sironi In-Reply-To: <11076.1322906459@critter.freebsd.dk> Date: Sat, 3 Dec 2011 11:37:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0011FD6A-E29D-4F67-913C-897BA1B2F56F@gmail.com> References: <11076.1322906459@critter.freebsd.dk> To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.1084) Cc: 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 10:38:16 -0000 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. On 03/dic/2011, at 11.00, Poul-Henning Kamp wrote: > In message , Filippo = Sironi wri > tes: >=20 > Why don't you just use mmap(2) ? I couldn't see anything you > couldn't do with it. >=20 > There's also support in pthread for thread specific storage, which > should be your first choice. >=20 >=20 > --=20 > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe =20 > Never attribute to malice what can adequately be explained by = incompetence.