summaryrefslogtreecommitdiff
path: root/libsysfs
diff options
context:
space:
mode:
authorchris_friesen@sympatico.ca <chris_friesen@sympatico.ca>2004-03-31 23:03:07 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:13 -0700
commitf27125f98f6487e881a957726da895aebd799f0d (patch)
tree7c4c9ed2f78dc37a338964b17940466b04d1fea3 /libsysfs
parent7b9b18392182e5cfa5d731288e8592549bdf67df (diff)
[PATCH] udevd race conditions and performance, assorted cleanups
This patch covers a number of areas: 1) sysfs.h is fixed up to use the common dbg() macro. This fixes the case where DEBUG is defined but USE_LOG isn't. 2) udevstart.c is modified to include the proper headers, rather than getting them indirectly which can break depending on Makefile flags 3) udevd.c gets some major changes: a) I added a pipe from the signal handler. This fixes the race conditions that I mentioned earlier. Basically, the point of the pipe is to force the select() call to return immediately if a signal handler fired before we actually started the select() call. This then lets us run the appropriate code based on flags set in the signal handler proper. b) I added a number of flags to coalesce calls to common routines. This should make things slightly more efficient. c) since most calls will tend to come in with a sequence number larger than what has been received, I switched msg_queue_insert() to scan the msg_list backwards to improve performance. filename="udevd.diff"
Diffstat (limited to 'libsysfs')
-rw-r--r--libsysfs/sysfs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libsysfs/sysfs.h b/libsysfs/sysfs.h
index 1b800ddcd2..0fdb38af19 100644
--- a/libsysfs/sysfs.h
+++ b/libsysfs/sysfs.h
@@ -37,9 +37,7 @@
#ifdef DEBUG
#include "../logging.h"
#define dprintf(format, arg...) \
- do { \
- log_message (LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg); \
- } while (0)
+ dbg(format, ##arg)
#else
#define dprintf(format, arg...) do { } while (0)
#endif