Lines Matching refs:new
151 union smc_host_cursor *new) in smc_curs_diff() argument
153 if (old->wrap != new->wrap) in smc_curs_diff()
155 ((size - old->count) + new->count)); in smc_curs_diff()
157 return max_t(int, 0, (new->count - old->count)); in smc_curs_diff()
165 union smc_host_cursor *new) in smc_curs_comp() argument
167 if (old->wrap > new->wrap || in smc_curs_comp()
168 (old->wrap == new->wrap && old->count > new->count)) in smc_curs_comp()
169 return -smc_curs_diff(size, new, old); in smc_curs_comp()
170 return smc_curs_diff(size, old, new); in smc_curs_comp()
178 union smc_host_cursor *new) in smc_curs_diff_large() argument
180 if (old->wrap < new->wrap) in smc_curs_diff_large()
182 (size - old->count) + new->count + in smc_curs_diff_large()
183 (new->wrap - old->wrap - 1) * size, in smc_curs_diff_large()
186 if (old->wrap > new->wrap) /* wrap has switched from 0xffff to 0x0000 */ in smc_curs_diff_large()
188 (size - old->count) + new->count + in smc_curs_diff_large()
189 (new->wrap + 0xffff - old->wrap) * size, in smc_curs_diff_large()
192 return max_t(int, 0, (new->count - old->count)); in smc_curs_diff_large()