Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[libc] Allow CPU architectures to use unoptimised string functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Apr 19, 2016
1 parent 40a8a52 commit 91aa188
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/include/string.h
Expand Up @@ -10,6 +10,14 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

#include <stddef.h>

extern void * generic_memset ( void *dest, int character,
size_t len ) __nonnull;
extern void * generic_memcpy ( void *dest, const void *src,
size_t len ) __nonnull;
extern void * generic_memmove ( void *dest, const void *src,
size_t len ) __nonnull;

#include <bits/string.h>

/* Architecture-specific code is expected to provide these functions,
Expand All @@ -18,12 +26,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
void * memset ( void *dest, int character, size_t len ) __nonnull;
void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
extern void * generic_memset ( void *dest, int character,
size_t len ) __nonnull;
extern void * generic_memcpy ( void *dest, const void *src,
size_t len ) __nonnull;
extern void * generic_memmove ( void *dest, const void *src,
size_t len ) __nonnull;

extern int __pure memcmp ( const void *first, const void *second,
size_t len ) __nonnull;
Expand Down

0 comments on commit 91aa188

Please sign in to comment.