diff options
Diffstat (limited to 'rgo/src/memfill.c')
-rw-r--r-- | rgo/src/memfill.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rgo/src/memfill.c b/rgo/src/memfill.c index ec5e1fa..d4c27e0 100644 --- a/rgo/src/memfill.c +++ b/rgo/src/memfill.c @@ -6,6 +6,9 @@ #include <rgo-priv.h> +#include <stddef.h> +#include <stdint.h> + #if defined(rgo_priv_fastimpl) __asm__ ( ".global rgo_memfill\n" @@ -13,8 +16,8 @@ __asm__ ( "rgo_memfill:\n" /* void const * ptr - sus_typ_usz num - sus_typ_u8 val + size_t num + uint_least8_t val */ #if defined(sus_arch_amd64) /* rdi: Address of the current element. */ @@ -47,9 +50,9 @@ __asm__ ( #endif ); #else -void rgo_memfill(void * const sus_restr _ptr,sus_typ_usz const _num,sus_typ_u8 const _byte) { - sus_typ_u8 * pos = (sus_typ_u8 *)_ptr; - sus_typ_u8 * const afterbuf = pos + _num; +void rgo_memfill(void * const _ptr,size_t const _num,uint_least8_t const _byte) { + uint_least8_t * pos = (uint_least8_t *)_ptr; + uint_least8_t * const afterbuf = pos + _num; for (;pos != afterbuf;++pos) {*pos = _byte;} } #endif |