Both gcc and sparse will speed up tokenization by noticing
when a header file is protected by the standard preprocessor
#ifndef .. #endif exclusion.
However, that requires that the headers actually _use_ that
standard exclusion. Some did their own little broken dance.
* destructors.
*/
-#if defined(__KERNEL__) && !defined(_KOBJECT_H_)
+#ifndef _KOBJECT_H_
#define _KOBJECT_H_
+#if __KERNEL__
+
#include <linux/types.h>
#include <linux/list.h>
#include <linux/sysfs.h>
extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
-
+#endif /* __KERNEL__ */
#endif /* _KOBJECT_H_ */
*
*/
-#if defined(__KERNEL__) && !defined(_KREF_H_)
+#ifndef _KREF_H_
#define _KREF_H_
+#if __KERNEL__
+
#include <linux/types.h>
#include <asm/atomic.h>
void kref_get(struct kref *kref);
void kref_put(struct kref *kref, void (*release) (struct kref *kref));
+#endif /* __KERNEL__ */
#endif /* _KREF_H_ */
* (markhe@nextd.demon.co.uk)
*/
-#if !defined(_LINUX_SLAB_H)
+#ifndef _LINUX_SLAB_H
#define _LINUX_SLAB_H
#if defined(__KERNEL__)