From owner-freebsd-questions@FreeBSD.ORG Wed Apr 18 16:05:46 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5036D16A404 for ; Wed, 18 Apr 2007 16:05:46 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by mx1.freebsd.org (Postfix) with ESMTP id 124A413C4B9 for ; Wed, 18 Apr 2007 16:05:45 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so181152nza for ; Wed, 18 Apr 2007 09:05:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=avgRotVtyglk+m/UjdLJMniYbG4p3gmdYZxQcLUba4axhd3EVN8BLCb0yq2hZt2p03MlLvm6dSpbIkVAX3rr1w07ch3CVy2dNUO8GseI5tMOrdZYahX19docvI6LZQBGUTI2gVqkC8jXS5a0vyEvSgrqn5OSSMbJKsJy6JHT7j4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=c8vFZCX9/f0elkFHzhO/5ytbt7DdQC8NCwzbbsqh8DWiFy8tkUGnRQYwrfElGps+1F1FmEbRL/Xv5NRPMHovzZ6i0XSbaVYnQLO4RFMRZyUI5N18X1rGswMvGJFXYzoSKbt6MY3+6Ma+vXekSpxhC1KKYH9q7iwb0PLhfZhAlTc= Received: by 10.114.205.1 with SMTP id c1mr265168wag.1176912345213; Wed, 18 Apr 2007 09:05:45 -0700 (PDT) Received: by 10.114.192.12 with HTTP; Wed, 18 Apr 2007 09:05:44 -0700 (PDT) Message-ID: Date: Wed, 18 Apr 2007 18:05:44 +0200 From: usleepless@gmail.com To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: mmap on freebsd vs linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2007 16:05:46 -0000 Hi All, i am looking into implementing a piece of the V4L interface. this involves mmap'ing from userspace into kernelspace. in mplayer, this is what is called: tvi_v4l2.c: " priv->map[i].addr = mmap (0, priv->map[i].buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, priv->video_fd,priv->map[i].buf.m.offset); " the file descriptor parameter is the file descriptor of the opened capture device. the offset parameter should be filled in by the opened device. does mmap work on freebsd as it works on linux? ie: can i mmap any device? are there constraints on the device which should be met? regards, usleep