Changeset b2fa2d86 in mainline for boot/generic/src/memstr.c
- Timestamp:
- 2013-03-26T15:06:35Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ea15a89a
- Parents:
- 8a26f82 (diff), 5c4356b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/src/memstr.c
r8a26f82 rb2fa2d86 35 35 * memory areas cannot overlap. 36 36 * 37 * @param src 38 * @param dst 39 * @param cnt 37 * @param src Source address to copy from. 38 * @param dst Destination address to copy to. 39 * @param cnt Number of bytes to copy. 40 40 * 41 * @return Destination address. 41 * @return Destination address. 42 * 42 43 */ 43 44 void *memcpy(void *dst, const void *src, size_t cnt) 44 45 { 45 size_t i; 46 return __builtin_memcpy(dst, src, cnt); 47 } 46 48 47 for (i = 0; i < cnt; i++) 48 ((uint8_t *) dst)[i] = ((uint8_t *) src)[i]; 49 50 return dst; 49 /** Fill block of memory. 50 * 51 * Fill cnt bytes at dst address with the value val. 52 * 53 * @param dst Destination address to fill. 54 * @param val Value to fill. 55 * @param cnt Number of bytes to fill. 56 * 57 * @return Destination address. 58 * 59 */ 60 void *memset(void *dst, int val, size_t cnt) 61 { 62 return __builtin_memset(dst, val, cnt); 51 63 } 52 64
Note:
See TracChangeset
for help on using the changeset viewer.