This source file includes following definitions.
- __constant_c_memset
- __memset
1
2
3
4
5
6
7
8
9
10
11 #include <linux/types.h>
12
13 inline void * __constant_c_memset(void * s, unsigned long c, long count)
14 {
15 unsigned long xs = (unsigned long) s;
16
17
18
19
20
21 while (count > 0 && (xs & 7)) {
22 *(char *) xs = c;
23 count--; xs++;
24 }
25 while (count > 7) {
26 *(unsigned long *) xs = c;
27 count -=8; xs += 8;
28 }
29 while (count > 0) {
30 *(char *) xs = c;
31 count--; xs++;
32 }
33 return s;
34 }
35
36 void * __memset(void * s,char c,size_t count)
37 {
38 __constant_c_memset(s,0x0101010101010101UL * (unsigned char) c, count);
39 return s;
40 }