1 /* $NetBSD: explicit_memset.c,v 1.4 2014/06/24 16:39:39 drochner Exp $ */
4 * Written by Matthias Drochner <drochner@NetBSD.org>.
8 #if !defined(_KERNEL) && !defined(_STANDALONE)
12 __weak_alias(explicit_memset
,_explicit_memset
)
14 #define explicit_memset_impl __explicit_memset_impl
16 #include <lib/libkern/libkern.h>
20 * The use of a volatile pointer guarantees that the compiler
21 * will not optimise the call away.
23 void *(* volatile explicit_memset_impl
)(void *, int, size_t) = memset
;
26 explicit_memset(void *b
, int c
, size_t len
)
29 return (*explicit_memset_impl
)(b
, c
, len
);