aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsimple.h')
-rw-r--r--libsimple.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/libsimple.h b/libsimple.h
index e97ac27..3ee1e90 100644
--- a/libsimple.h
+++ b/libsimple.h
@@ -139,6 +139,8 @@
* be update to -1 if it is non-negative
* @return Return value of close(3) (0 on success,
* -1 on error), 0 if `*fdp < 0`
+ *
+ * @since 1.0
*/
_LIBSIMPLE_GCC_ONLY(__attribute__((__nonnull__)))
static inline int
@@ -163,6 +165,8 @@ libsimple_close(int *__fdp)
* @param list:non-void pointer The list
* @param i:size_t The index of the item to remove
* @param n:size_t Pointer to the number of items in the list, will be updated
+ *
+ * @since 1.0
*/
#define LIBSIMPLE_UNLIST(LIST, I, NP) libsimple_unlist((LIST), (I), (NP), sizeof(*(LIST)))
#ifndef UNLIST
@@ -177,6 +181,8 @@ libsimple_close(int *__fdp)
* @param i The index of the item to remove
* @param n Pointer to the number of items in the list, will be updated
* @param width The width, in bytes, of each item in the list
+ *
+ * @since 1.0
*/
_LIBSIMPLE_GCC_ONLY(__attribute__((__nonnull__)))
static inline void
@@ -191,20 +197,20 @@ libsimple_unlist(void *__list, size_t __i, size_t *__np, size_t __width)
#define _LIBSIMPLE_REMOVE_CONST(X, TYPE, ...) (*(TYPE *)(void *)&(X))
-#define LIBSIMPLE_REMOVE_CONST(...) _LIBSIMPLE_REMOVE_CONST(__VA_ARGS__, void *) /* TODO test, doc, man */
+#define LIBSIMPLE_REMOVE_CONST(...) _LIBSIMPLE_REMOVE_CONST(__VA_ARGS__, void *) /* TODO test, doc, man (since 1.2) */
#ifndef REMOVE_CONST
# define REMOVE_CONST(...) LIBSIMPLE_REMOVE_CONST(__VA_ARGS__)
#endif
-#define LIBSIMPLE_PREFETCH_RDONLY(ADDRESS, LOCALITY) /* void */ /* TODO test, doc, man */\
+#define LIBSIMPLE_PREFETCH_RDONLY(ADDRESS, LOCALITY) /* void */ /* TODO test, doc, man (since 1.2) */\
_LIBSIMPLE_GCC_ONLY(__builtin_prefetch(ADDRESS, 0, LOCALITY))
#ifndef PREFETCH_RDONLY
# define PREFETCH_RDONLY(...) LIBSIMPLE_PREFETCH_RDONLY(__VA_ARGS__)
#endif
-#define LIBSIMPLE_PREFETCH_RDWR(ADDRESS, LOCALITY) /* void */ /* TODO test, doc, man */\
+#define LIBSIMPLE_PREFETCH_RDWR(ADDRESS, LOCALITY) /* void */ /* TODO test, doc, man (since 1.2) */\
_LIBSIMPLE_GCC_ONLY(__builtin_prefetch(ADDRESS, 1, LOCALITY))
#ifndef PREFETCH_RDWR
# define PREFETCH_RDWR(...) LIBSIMPLE_PREFETCH_RDWR(__VA_ARGS__)
@@ -214,7 +220,7 @@ libsimple_unlist(void *__list, size_t __i, size_t *__np, size_t __width)
#define _LIBSIMPLE_ASSUME_ALIGNED(PTR, ALIGNMENT, ...)\
_LIBSIMPLE_GCC_ONLY(__builtin_assume_aligned(PTR, ALIGNMENT))
#if defined(__GNUC__) && !defined(__clang__)
-# define LIBSIMPLE_ASSUME_ALIGNED(PTR, ...) /* returns PTR */ /* TODO test, doc, man */\
+# define LIBSIMPLE_ASSUME_ALIGNED(PTR, ...) /* returns PTR */ /* TODO test, doc, man (since 1.2) */\
_LIBSIMPLE_GCC_ONLY(__builtin_assume_aligned(PTR, ##__VA_ARGS__,\
_LIBSIMPLE_C11_ONLY(_Alignof(PTR))\
_LIBSIMPLE_PREC11_ONLY(__alignof(PTR))))
@@ -224,20 +230,20 @@ libsimple_unlist(void *__list, size_t __i, size_t *__np, size_t __width)
#endif
-#define LIBSIMPLE_ASSUME_MISALIGNED(PTR, ALIGNMENT, OFFSET) /* returns PTR */ /* TODO test, doc, man */\
+#define LIBSIMPLE_ASSUME_MISALIGNED(PTR, ALIGNMENT, OFFSET) /* returns PTR */ /* TODO test, doc, man (since 1.2) */\
__builtin_assume_aligned(PTR, ALIGNMENT, OFFSET)
#ifndef ASSUME_MISALIGNED
# define ASSUME_MISALIGNED(...) LIBSIMPLE_ASSUME_MISALIGNED(__VA_ARGS__)
#endif
-#define LIBSIMPLE_UNROLLED(N) _LIBSIMPLE_GCC_ONLY(_LIBSIMPLE_C11_ONLY(_Pragma("GCC unroll "#N))) /* TODO test, doc, man */
+#define LIBSIMPLE_UNROLLED(N) _LIBSIMPLE_GCC_ONLY(_LIBSIMPLE_C11_ONLY(_Pragma("GCC unroll "#N))) /* TODO test, doc, man (since 1.2) */
#ifndef UNROLLED
# define UNROLLED(N) LIBSIMPLE_UNROLLED(N)
#endif
-#define LIBSIMPLE_SIMDLOOP _LIBSIMPLE_GCC_ONLY(_LIBSIMPLE_C11_ONLY(_Pragma("GCC ivdep"))) /* TODO test, doc, man */
+#define LIBSIMPLE_SIMDLOOP _LIBSIMPLE_GCC_ONLY(_LIBSIMPLE_C11_ONLY(_Pragma("GCC ivdep"))) /* TODO test, doc, man (since 1.2) */
#ifndef SIMDLOOP
# define SIMDLOOP LIBSIMPLE_SIMDLOOP
#endif