Przeglądaj źródła

[libc] Allow CPU architectures to use unoptimised string functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 lat temu
rodzic
commit
91aa188fbb
1 zmienionych plików z 8 dodań i 6 usunięć
  1. 8
    6
      src/include/string.h

+ 8
- 6
src/include/string.h Wyświetl plik

@@ -10,6 +10,14 @@
10 10
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 11
 
12 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 21
 #include <bits/string.h>
14 22
 
15 23
 /* Architecture-specific code is expected to provide these functions,
@@ -18,12 +26,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
18 26
 void * memset ( void *dest, int character, size_t len ) __nonnull;
19 27
 void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
20 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 30
 extern int __pure memcmp ( const void *first, const void *second,
29 31
 			   size_t len ) __nonnull;

Ładowanie…
Anuluj
Zapisz