diff mbox

[04/16] api: odp_buffer.h: undefined behavior description

Message ID 1422528008-29845-5-git-send-email-ola.liljedahl@linaro.org
State New
Headers show

Commit Message

Ola Liljedahl Jan. 29, 2015, 10:39 a.m. UTC
Documented API calls which are guaranteed to handle invalid/stale handles.

Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
---
(This document/code contribution attached is provided under the terms of
agreement LES-LTM-21309)

 platform/linux-generic/include/api/odp_buffer.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_buffer.h b/platform/linux-generic/include/api/odp_buffer.h
index 8e144b8..13b9ea0 100644
--- a/platform/linux-generic/include/api/odp_buffer.h
+++ b/platform/linux-generic/include/api/odp_buffer.h
@@ -72,7 +72,9 @@  uint32_t odp_buffer_size(odp_buffer_t buf);
 /**
  * Tests if buffer is valid
  *
- * @param buf      Buffer handle
+ * @param buf      Buffer handle (possibly invalid)
+ * @note This is the only buffer API function which accepts invalid buffer
+ * handles (any bit value) without causing undefined behavior.
  *
  * @retval 1 Buffer handle represents a valid buffer.
  * @retval 0 Buffer handle does not represent a valid buffer.