diff options
author | imp <imp@FreeBSD.org> | 2009-02-11 04:52:46 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-02-11 04:52:46 +0000 |
commit | cd0337328da4e5286a2f78a294d73654e8c7125f (patch) | |
tree | fee21ca00a79ccb9f2125737b575fdb5e258efc0 /sys | |
parent | 7c51c6c0f1a56ae94b85bf91c4212895a2e9827e (diff) | |
download | FreeBSD-src-cd0337328da4e5286a2f78a294d73654e8c7125f.zip FreeBSD-src-cd0337328da4e5286a2f78a294d73654e8c7125f.tar.gz |
o Introduce KOBJMETHOD_END for the end of the kobj list.
o Fix a minor indentation problem.
o Put in the extra-strict KOBJMETHOD define, but commented out since
the tree isn't yet ready.
Reviewed by: (1) was posted to arch@ without objection (and 1 go for it)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/kobj.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h index 9272e49..385a2c3 100644 --- a/sys/sys/kobj.h +++ b/sys/sys/kobj.h @@ -92,7 +92,17 @@ struct kobjop_desc { /* * Shorthand for constructing method tables. */ +#if 1 #define KOBJMETHOD(NAME, FUNC) { &NAME##_desc, (kobjop_t) FUNC } +#else /* notyet */ +#define KOBJMETHOD(NAME, FUNC) \ +{ &NAME##_desc, (kobjop_t) (FUNC != (NAME##_t *)NULL ? FUNC : NULL) } +#endif + +/* + * + */ +#define KOBJMETHOD_END { NULL, NULL } /* * Declare a class (which should be defined in another file. @@ -127,7 +137,7 @@ struct kobj_class classvar = { \ base1) \ \ static kobj_class_t name ## _baseclasses[] = \ - { &base1, NULL }; \ + { &base1, NULL }; \ struct kobj_class classvar = { \ #name, methods, size, name ## _baseclasses \ } |