On Tue, Sep 2, 2008 at 13:09, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote: > udev_sysfs.c device and attribute value caches are only appropriate for > short-lived processes, like udev-event and usbid. In long lived processes > they would fill up with stale data. Sure, the cache was never coded to be used in threaded programs. > Fortunately libudev doesn't use these caches. For good reason, yeah. And it will not, at least not in its current state. > But this should be made > explicit to guard against future changes. Let's move the caches into a > separate file, with its own initialization and cleanup functions. Wouldn't it be nicer to create a sysfs_cache object, which is passed to all these functions? The "cheap" tools can just use NULL there, but any possible user could have more than one instance of the cache. The cache is really needed if you do thousand of rule compares against a sysfs value, over and over. I guess we should start changing the stuff to work with local vars, instead of moving the current global stuff to a different file? In the long run libudev will take over a lot of the functionality and replace the old code, but depending on the actual need, it might take a while ... Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html