Browse Source

[libc] Allow CPU architectures to use unoptimised string functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
91aa188fbb
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      src/include/string.h

+ 8
- 6
src/include/string.h View File

10
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
10
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
 
11
 
12
 #include <stddef.h>
12
 #include <stddef.h>
13
+
14
+extern void * generic_memset ( void *dest, int character,
15
+			       size_t len ) __nonnull;
16
+extern void * generic_memcpy ( void *dest, const void *src,
17
+			       size_t len ) __nonnull;
18
+extern void * generic_memmove ( void *dest, const void *src,
19
+				size_t len ) __nonnull;
20
+
13
 #include <bits/string.h>
21
 #include <bits/string.h>
14
 
22
 
15
 /* Architecture-specific code is expected to provide these functions,
23
 /* Architecture-specific code is expected to provide these functions,
18
 void * memset ( void *dest, int character, size_t len ) __nonnull;
26
 void * memset ( void *dest, int character, size_t len ) __nonnull;
19
 void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
27
 void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
20
 void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
28
 void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
21
-extern void * generic_memset ( void *dest, int character,
22
-			       size_t len ) __nonnull;
23
-extern void * generic_memcpy ( void *dest, const void *src,
24
-			       size_t len ) __nonnull;
25
-extern void * generic_memmove ( void *dest, const void *src,
26
-				size_t len ) __nonnull;
27
 
29
 
28
 extern int __pure memcmp ( const void *first, const void *second,
30
 extern int __pure memcmp ( const void *first, const void *second,
29
 			   size_t len ) __nonnull;
31
 			   size_t len ) __nonnull;

Loading…
Cancel
Save