lkml.org 
[lkml]   [2001]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: share buffer between user and kernel?
It was a dark and stormy night.  Suddenly "Peter T. Breuer" <ptb@it.uc3m.es> spoke:

> What is the currently approved method of sharing a buffer between
> user space and kernel space, so that I can avoid one or two
> copy_to/from_user?

Two basic choices here:

1) Allocate the buffer in kernel space and use the mmap() method to give the
user-space program access to it; and

2) Allocate the buffer in you user application program and use the KIOBUF method
to give the kernel and/or hardware access to your buffer. Look in
<linux/iobuf.h> for kernel-level inspiration.

---------------------------------------------+-----------------------------
Tommy Reynolds | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.236.837.3839
Senior Software Developer | Mobile: +1.919.641.2923
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.047 / U:4.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site