mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 20:43:36 +01:00
string: use __restrict instead of restrict for C++ compatibility
This commit is contained in:
parent
50cbcd4ac1
commit
74b2dbeb36
4 changed files with 6 additions and 4 deletions
|
@ -104,6 +104,7 @@ void *dma_memset(void *dst, uint32_t pattern, size_t size);
|
|||
@dst Destination address (32-aligned)
|
||||
@dst Source addresss (32-aligned)
|
||||
@size Size of region (32-aligned) */
|
||||
void *dma_memcpy(void * restrict dst, const void * restrict src, size_t size);
|
||||
void *dma_memcpy(void * __restrict dst, const void * __restrict src,
|
||||
size_t size);
|
||||
|
||||
#endif /* GINT_DMA */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stddef.h>
|
||||
|
||||
/* memcpy(): Copy a chunk of memory to a non-overlapping destination */
|
||||
void *memcpy(void * restrict dest, void const * restrict src, size_t n);
|
||||
void *memcpy(void * __restrict dest, void const * __restrict src, size_t n);
|
||||
|
||||
/* memset(): Fill a chunk of memory with a single byte */
|
||||
void *memset(void *dest, int byte, size_t n);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <gint/dma.h>
|
||||
|
||||
/* dma_memcpy(): Fast 32-aligned memcpy */
|
||||
void *dma_memcpy(void * restrict dst, const void * restrict src, size_t size)
|
||||
void *dma_memcpy(void * __restrict dst, const void * __restrict src,
|
||||
size_t size)
|
||||
{
|
||||
dma_transfer(1, DMA_32B, size >> 5, src, DMA_INC, dst, DMA_INC);
|
||||
dma_transfer_wait(1);
|
||||
|
|
|
@ -50,7 +50,7 @@ void gint_setrestart(int restart)
|
|||
@l Source pointer (load address)
|
||||
@s Size of area (should be a multiple of 16)
|
||||
@r Destination pointer (relocation address) */
|
||||
static void regcpy(uint32_t * restrict l, int32_t s, uint32_t * restrict r)
|
||||
static void regcpy(uint32_t * __restrict l, int32_t s, uint32_t * __restrict r)
|
||||
{
|
||||
while(s > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue