diff mbox

[v2,1/5] api: odp_hints: Add ODP_NORETURN

Message ID 1422963328-31760-2-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 07b2f9314085831b205518ae0a7f6d45c546d537
Headers show

Commit Message

Mike Holmes Feb. 3, 2015, 11:35 a.m. UTC
Add the ability to mark a function as never returning to the caller.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 include/odp/api/hints.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/include/odp/api/hints.h b/include/odp/api/hints.h
index 7f04886..a7aa90e 100644
--- a/include/odp/api/hints.h
+++ b/include/odp/api/hints.h
@@ -25,6 +25,10 @@  extern "C" {
 
 #ifdef __GNUC__
 
+/** Define a fn that does not return
+ */
+#define ODP_NORETURN __attribute__((__noreturn__))
+
 /** Define a weak symbol
  * This is primarily useful in defining library functions that can be
  * overridden in user code.