Re: new file in kernel.

From: Stefan Richter
Date: Sat Jan 19 2008 - 12:57:55 EST


Rafael Sisto wrote:
>> Did you already discuss your problems regarding design and
>> implementation with your teachers before turning to LKML for advice on
>> your homework?
>
> Yes, the thing is, that this is a research project, and we don't get
> much information from the teachers...
> We must research on our own.

Perhaps the teachers don't prepare you well enough but are not aware of
this issue. Also, if you go as far as asking people here to show you
example code (rather than for example posting your own draft code or
pseudo code and asking for comments), does this still count as
researching on your own?

[...]
> And I think this is a kernel development issue.

Yes, but AFAIU with the primary goal of you learning something, rather
than to advance the Linux program. So, kernelnewbies might be a better
list; but still, I am more irritated about /what/ you ask.


A few comments on your earlier posts:
>>>>> Or else, where can I find some more information about what the
>>>>> parameters mean?

To find out how things work in a complex C program like the kernel,
tools like LXR and cscope/ kscope can be quite helpful. In particular,
they help navigate between definitions and call sites.
http://lxr.free-electrons.com/
http://lxr.linux.no/linux
http://kscope.sourceforge.net/

>>> we have to build something
>>> like IPC, but simpler. we have a "get" system call (we thought we
>>> would just create a file in /tmp, not use it from the kernel, just
>>> create it) and then the users that want to access the shared memory
>>> will call the system call "attach". That will map the file into user
>>> space, as shared.

Why back the shared memory with a file? Wouldn't a memory buffer suffice?
--
Stefan Richter
-=====-==--- ---= =--==
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/