Messages in this thread | | | Date | Tue, 31 Aug 2004 15:10:29 -0700 | From | Andrew Morton <> | Subject | Re: [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/
| |