lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] kernel sysfs events layer
Robert Love <rml@ximian.com> wrote:
>
> On Tue, 2004-08-31 at 15:00 -0700, Andrew Morton wrote:
>
> > Why not share the implementation here?
>
> Because we will probably want to export do_send_kevent(), with a
> different name, if this thing starts getting used, because there are
> places where the kobj path is already computed and although inexpensive
> it does cost a few cycles to go kobject -> path as a string.
>

That's unrelated. I meant:

static int __send_kevent(enum kevent type, struct kset *kset,
struct kobject *kobj, const char *signal, int gfp_flags)
{
const char *path;
int ret;

path = kobject_get_path(kset, kobj, gfp_flags);
if (!path)
return -ENOMEM;

ret = do_send_kevent(type, gfp_flags, path, signal);
kfree(path);

return ret;
}

int send_kevent(enum kevent type, struct kset *kset,
struct kobject *kobj, const char *signal)
{
return __send_kevent(type, kset, kobj, signal, GFP_KERNEL);
}
EXPORT_SYMBOL_GPL(send_kevent);


int send_kevent_atomic(enum kevent type, struct kset *kset,
struct kobject *kobj, const char *signal)
{
return __send_kevent(type, kset, kobj, signal, GFP_ATOMIC);
}
EXPORT_SYMBOL_GPL(send_kevent_atomic);
-
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:05    [W:1.165 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site