Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2007 18:05:44 +0200
From:      usleepless@gmail.com
To:        freebsd-questions@freebsd.org
Subject:   mmap on freebsd vs linux
Message-ID:  <c39ec84c0704180905od39236ag5ec1091ec8f1a15@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0704180905od39236ag5ec1091ec8f1a15>