1 /* cas.c -- implement sync.cas for Go.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
9 _Bool
cas (int32_t *, int32_t, int32_t) asm ("libgo_sync.sync.cas");
12 cas (int32_t *ptr
, int32_t old
, int32_t new)
14 return __sync_bool_compare_and_swap (ptr
, old
, new);