lkml.org 
[lkml]   [2004]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] kernel events layer
On Jul 24 2004, at 11:45, Robert Love was caught saying:
>
> > > The easiest way to avoid that is simply to use a name similar to the
> > > path name.
> >
> > What is the path name of a device from the kernels point of view?
> > Since device naming in /dev is left up to userland now, it has to
> > be something else that the kernel is aware of.
>
> I might not of been clear - path name of the file in the kernel source
> tree. So if you add an event to fs/open.c the path is
> "/org/kernel/fs/open". This is a pretty generic naming scheme that
> ensures names will be unique within the kernel and will not conflict
> with names outside the kernel (e.g. the global URI space of whatever is
> used in user-space).

Oh ok, that makes much more sense now. "arch/kerne/cpu" is the
name of the file, from which that message came.

> > an incredibly arbitrary string), we pass the object name and attribute name
> > to user space. User space can then go read the appropriate sysfs file or take
> > whatever other action is required to determine what the state change actually
> > is.
>
> Agreed. Not passing the data and just passing a "change occurred" flag
> is a good idea in many cases. For example, for "new filesystem mounted"
> I think it makes most sense to just send out a "new filesystem mounted"
> signal and not include the data. Let user-space rescan /proc/mtab in
> response.
>
> But we cannot do that for everything.
>
> "high" is only an arbitrary string if it is not standardized. If the
> temperature event is defined to come from such and such an interface,
> with such and such values, it is all very easy to use. I mean, this is
> how object systems work today.

I think we agree. So are there some existing docs that you/Ximian has
on reccomended usage and object naming? I didn't see anything on
freedesktop.org. That's where a lot of my questions are coming from. We
have this really simple events system, but how do we expect it to be used
in the kernel.

~Deepak


~Deepak

--
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/

"Unlike me, many of you have accepted the situation of your imprisonment and
will die here like rotten cabbages." - Number 6
-
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 14:04    [W:0.076 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site