lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linking with kernel code (Makefile)
The character device is a good idea!!!
But how would the device's mmap be implemented?
I know how the read and write work, but they copy the data from one space
to another, which would be slow if there is much communication. Because
this looses the benifits of shared memory

About the kernel linking, I'm not making a module driver,
I'm trying to recompile the kernel after adding my file (kshared.c)
I guess I should be able to access all structures and functions in the
kernel, if I succeed to link correctly with the files containing those
functions and structures, but I'm not so good at make files.


--- "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:
> > What I want to do:
> > create a shared memory segment between user space and kernel space
>
> Create a character device.
> Have the driver allocate memory.
> Let the user mmap() it.
>
> > I can't link with the array or the function, this also happens
> with
> > all functions that are not defined in 'ksyms'
> > Even though I declared 'newseg' and 'shm_segs' as 'extern' in my
> file
> ...
> > But while making bzImage, it gives the error unresolved external
> 'newseg'
> >
> > So my question is how can I link to the kernel source code, or am I
> not
> > allowed to?
>
> You are not allowed to use interfaces that are not exported.
> This is partly to prevent you from depending on code that is
> very likely to change, and partly to prevent a Microsoft Linux
> or similar abuse of the GPL.
>
> If you really need it, make a non-module driver. Maybe after
> that gets accepted into the main kernel you could convince
> Linus to export the function you want for module use.


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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