On Saturday, December 03, 2011 5:37:01 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.

You could allocate a dedicated VM object for each thread's information and 
populate it with a single page.  You could then return that from a
csw->d_mmap_single() routine.  You could also use some routines I'm about to
add for the shm_open() API that let you easily map shm_open() objects into the
kernel where threads create a shm object in userland and pass the fd into the
kernel to let the kernel map it.

> On 03/dic/2011, at 11.00, Poul-Henning Kamp wrote:
> 
> > In message <[email protected]>, 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
> > [email protected]         | TCP/IP since RFC 956
> > FreeBSD committer       | BSD since 4.3-tahoe    
> > Never attribute to malice what can adequately be explained by 
incompetence.
> 
> _______________________________________________
> [email protected] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[email protected]"
> 

-- 
John Baldwin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to