Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 711a660d authored by Chuck Ebbert's avatar Chuck Ebbert Committed by Ingo Molnar
Browse files

[PATCH] mutex subsystem, add typecheck_fn(type, function)



add typecheck_fn(type, function) to do type-checking of function
pointers.

Modified-by: default avatarIngo Molnar <mingo@elte.hu>

(made it typeof() based, instead of typedef based.)

Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ffbf670f
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -286,6 +286,15 @@ extern void dump_stack(void);
	1; \
	1; \
})
})


/*
 * Check at compile time that 'function' is a certain type, or is a pointer
 * to that type (needs to use typedef for the function type.)
 */
#define typecheck_fn(type,function) \
({	typeof(type) __tmp = function; \
	(void)__tmp; \
})

#endif /* __KERNEL__ */
#endif /* __KERNEL__ */


#define SI_LOAD_SHIFT	16
#define SI_LOAD_SHIFT	16