/* * Copyright (C) 2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied.
*/
/* * Atomically add a to v->counter as long as v is not already u. * Returns the original value at v->counter. * * This is often used through atomic_inc_not_zero()
*/ staticinlineint arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
{ int old, tmp;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.