xref: /kernel/linux/linux-6.6/scripts/atomic/fallbacks/fetch_add_unless
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/scripts/atomic/fallbacks/
162306a36Sopenharmony_cicat << EOF
262306a36Sopenharmony_ci	${int} c = raw_${atomic}_read(v);
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci	do {
562306a36Sopenharmony_ci		if (unlikely(c == u))
662306a36Sopenharmony_ci			break;
762306a36Sopenharmony_ci	} while (!raw_${atomic}_try_cmpxchg(v, &c, c + a));
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci	return c;
1062306a36Sopenharmony_ciEOF
11

Indexes created Thu Nov 07 10:32:03 CST 2024