Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 FUNCTION | 2 FUNCTION |
| 3 <<memset>>---set an area of memory | 3 <<memset>>---set an area of memory |
| 4 | 4 |
| 5 INDEX | 5 INDEX |
| 6 memset | 6 memset |
| 7 | 7 |
| 8 ANSI_SYNOPSIS | 8 ANSI_SYNOPSIS |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 void *memset(void *<[dst]>, int <[c]>, size_t <[length]>); | 10 void *memset(void *<[dst]>, int <[c]>, size_t <[length]>); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 PORTABILITY | 27 PORTABILITY |
| 28 <<memset>> is ANSI C. | 28 <<memset>> is ANSI C. |
| 29 | 29 |
| 30 <<memset>> requires no supporting OS subroutines. | 30 <<memset>> requires no supporting OS subroutines. |
| 31 | 31 |
| 32 QUICKREF | 32 QUICKREF |
| 33 memset ansi pure | 33 memset ansi pure |
| 34 */ | 34 */ |
| 35 | 35 |
| 36 /* | 36 /* |
| 37 * The body of this function should not appear in PNaCl bitcode. | 37 * The body of this function should not appear in PNaCl bitcode. |
|
Derek Schuff
2015/01/16 17:29:06
same
jvoung (off chromium)
2015/01/16 17:54:44
Done.
| |
| 38 * See https://code.google.com/p/nativeclient/issues/detail?id=3493 | 38 * See https://code.google.com/p/nativeclient/issues/detail?id=3493 |
| 39 */ | 39 */ |
| 40 #ifndef __pnacl__ | 40 #ifndef PNACL_BITCODE |
| 41 | 41 |
| 42 #include <string.h> | 42 #include <string.h> |
| 43 #include "local.h" | 43 #include "local.h" |
| 44 | 44 |
| 45 #define LBLOCKSIZE (sizeof(long)) | 45 #define LBLOCKSIZE (sizeof(long)) |
| 46 #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) | 46 #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) |
| 47 #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) | 47 #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) |
| 48 | 48 |
| 49 _PTR | 49 _PTR |
| 50 __inhibit_loop_to_libcall | 50 __inhibit_loop_to_libcall |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 } | 102 } |
| 103 | 103 |
| 104 #endif /* not PREFER_SIZE_OVER_SPEED */ | 104 #endif /* not PREFER_SIZE_OVER_SPEED */ |
| 105 | 105 |
| 106 while (n--) | 106 while (n--) |
| 107 *s++ = (char) c; | 107 *s++ = (char) c; |
| 108 | 108 |
| 109 return m; | 109 return m; |
| 110 } | 110 } |
| 111 | 111 |
| 112 #endif /* __pnacl__ */ | 112 #endif /* PNACL_BITCODE */ |
| OLD | NEW |