diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-12 10:12:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-12 10:12:16 +0000 |
commit | ee5d3e43c585a4386ded58d76fac2ef0985d96b5 (patch) | |
tree | a6f59fa82673a7982238405197ec652de498c529 /common.h | |
parent | 52c9d46227efeb02415c202866d38b4fc458d572 (diff) | |
download | ldetect-ee5d3e43c585a4386ded58d76fac2ef0985d96b5.tar ldetect-ee5d3e43c585a4386ded58d76fac2ef0985d96b5.tar.gz ldetect-ee5d3e43c585a4386ded58d76fac2ef0985d96b5.tar.bz2 ldetect-ee5d3e43c585a4386ded58d76fac2ef0985d96b5.tar.xz ldetect-ee5d3e43c585a4386ded58d76fac2ef0985d96b5.zip |
make ldetect 3x faster (and even faster on machines quite quite a lot
of devices such as servers)
(modalias_init) split it out of modalias_resolve_module()
(modalias_cleanup) move libkmod related cleanups here
(hid_probe,find_modules_through_aliases) only initialize libkmod once
(which reduces user time from 0.26 to 0.08s & elapsed time from 0.28 to
0.9s)
(backported from trunk)
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -19,8 +19,9 @@ typedef enum { extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciusbtable, const descr_lookup, int is_pci) NON_EXPORTED; extern void pciusb_initialize(struct pciusb_entry *e) NON_EXPORTED; -extern char *modalias_resolve_module(const char *modalias) NON_EXPORTED; -extern void modalias_cleanup(void) NON_EXPORTED; +extern struct kmod_ctx* modalias_init() NON_EXPORTED; +extern char *modalias_resolve_module(struct kmod_ctx *ctx, const char *modalias) NON_EXPORTED; +extern void modalias_cleanup(struct kmod_ctx *ctx) NON_EXPORTED; #define MAX_DEVICES 100 #define BUF_SIZE 512 |