Rev 392 | Rev 419 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 392 | Rev 393 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | * Copy a given number of bytes (3rd argument) |
34 | * Copy a given number of bytes (3rd argument) |
35 | * from the memory location defined by 2nd argument |
35 | * from the memory location defined by 2nd argument |
36 | * to the memory location defined by 1st argument. |
36 | * to the memory location defined by 1st argument. |
37 | * The memory areas cannot overlap. |
37 | * The memory areas cannot overlap. |
38 | * |
38 | * |
39 | * @param destination |
39 | * @param dst Destination |
40 | * @param source |
40 | * @param src Source |
41 | * @param number of bytes |
41 | * @param cnt Number of bytes |
42 | * @return destination |
42 | * @return Destination |
43 | */ |
43 | */ |
44 | static inline void * memcpy(void * dst, const void * src, size_t cnt) |
44 | static inline void * memcpy(void * dst, const void * src, size_t cnt) |
45 | { |
45 | { |
46 | __u32 d0, d1, d2; |
46 | __u32 d0, d1, d2; |
47 | 47 | ||
Line 70... | Line 70... | ||
70 | * |
70 | * |
71 | * Compare a given number of bytes (3rd argument) |
71 | * Compare a given number of bytes (3rd argument) |
72 | * at memory locations defined by 1st and 2nd argument |
72 | * at memory locations defined by 1st and 2nd argument |
73 | * for equality. If bytes are equal function returns 0. |
73 | * for equality. If bytes are equal function returns 0. |
74 | * |
74 | * |
75 | * @param region 1 |
75 | * @param src Region 1 |
76 | * @param region 2 |
76 | * @param dst Region 2 |
77 | * @param number of bytes |
77 | * @param cnt Number of bytes |
78 | * @return zero if bytes are equal, non-zero otherwise |
78 | * @return Zero if bytes are equal, non-zero otherwise |
79 | */ |
79 | */ |
80 | static inline int memcmp(__address src, __address dst, size_t cnt) |
80 | static inline int memcmp(__address src, __address dst, size_t cnt) |
81 | { |
81 | { |
82 | __u32 d0, d1, d2; |
82 | __u32 d0, d1, d2; |
83 | int ret; |
83 | int ret; |
Line 98... | Line 98... | ||
98 | /** Fill memory with words |
98 | /** Fill memory with words |
99 | * Fill a given number of words (2nd argument) |
99 | * Fill a given number of words (2nd argument) |
100 | * at memory defined by 1st argument with the |
100 | * at memory defined by 1st argument with the |
101 | * word value defined by 3rd argument. |
101 | * word value defined by 3rd argument. |
102 | * |
102 | * |
103 | * @param destination |
103 | * @param dst Destination |
104 | * @param number of words |
104 | * @param cnt Number of words |
105 | * @param value to fill |
105 | * @param x Value to fill |
106 | */ |
106 | */ |
107 | static inline void memsetw(__address dst, size_t cnt, __u16 x) |
107 | static inline void memsetw(__address dst, size_t cnt, __u16 x) |
108 | { |
108 | { |
109 | __u32 d0, d1; |
109 | __u32 d0, d1; |
110 | 110 | ||
Line 120... | Line 120... | ||
120 | /** Fill memory with bytes |
120 | /** Fill memory with bytes |
121 | * Fill a given number of bytes (2nd argument) |
121 | * Fill a given number of bytes (2nd argument) |
122 | * at memory defined by 1st argument with the |
122 | * at memory defined by 1st argument with the |
123 | * word value defined by 3rd argument. |
123 | * word value defined by 3rd argument. |
124 | * |
124 | * |
125 | * @param destination |
125 | * @param dst Destination |
126 | * @param number of bytes |
126 | * @param cnt Number of bytes |
127 | * @param value to fill |
127 | * @param x Value to fill |
128 | */ |
128 | */ |
129 | static inline void memsetb(__address dst, size_t cnt, __u8 x) |
129 | static inline void memsetb(__address dst, size_t cnt, __u8 x) |
130 | { |
130 | { |
131 | __u32 d0, d1; |
131 | __u32 d0, d1; |
132 | 132 |