Lines Matching full:mask

94  * @mask: 0 (false) or -1 (true) to identify which value to select
97 * Returns: true_val if mask == -1, false_val if mask == 0
99 static inline unsigned int const_time_select(unsigned int mask, in const_time_select() argument
103 return (mask & true_val) | (~mask & false_val); in const_time_select()
109 * @mask: 0 (false) or -1 (true) to identify which value to select
112 * Returns: true_val if mask == -1, false_val if mask == 0
114 static inline int const_time_select_int(unsigned int mask, int true_val, in const_time_select_int() argument
117 return (int) const_time_select(mask, (unsigned int) true_val, in const_time_select_int()
124 * @mask: 0 (false) or -1 (true) to identify which value to select
127 * Returns: true_val if mask == -1, false_val if mask == 0
129 static inline u8 const_time_select_u8(u8 mask, u8 true_val, u8 false_val) in const_time_select_u8() argument
131 return (u8) const_time_select(mask, true_val, false_val); in const_time_select_u8()
137 * @mask: 0 (false) or -1 (true) to identify which value to select
140 * Returns: true_val if mask == -1, false_val if mask == 0
142 static inline s8 const_time_select_s8(u8 mask, s8 true_val, s8 false_val) in const_time_select_s8() argument
144 return (s8) const_time_select(mask, (unsigned int) true_val, in const_time_select_s8()
151 * @mask: 0 (false) or -1 (true) to identify which value to copy
161 static inline void const_time_select_bin(u8 mask, const u8 *true_val, in const_time_select_bin() argument
168 dst[i] = const_time_select_u8(mask, true_val[i], false_val[i]); in const_time_select_bin()
177 unsigned int mask; in const_time_memcmp() local
184 mask = const_time_is_zero((unsigned int) diff); in const_time_memcmp()
185 res = const_time_select_int(mask, res, diff); in const_time_memcmp()