aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/cdefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h
index 59c81d4..da78510 100644
--- a/sys/include/sys/cdefs.h
+++ b/sys/include/sys/cdefs.h
@@ -154,6 +154,13 @@
#define __MODULE_NAME(name) \
__used static const char *__THIS_MODULE = name
+/*
+ * Attempts to call a __weak function. Does nothing
+ * if routine not implemented.
+ */
+#define __TRY_CALL(routine, ...) \
+ if (routine != NULL) routine(__VA_ARGS__)
+
#else
/*