mmap implementation for cdev
Julian Elischer
julian at freebsd.org
Sat Dec 3 17:43:40 UTC 2011
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<A842C229-1846-408A-999A-9347770EFE7A at gmail.com>, 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 at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
>
More information about the freebsd-hackers
mailing list