* include/std/future (__async_sfinae_helper): Remove.
[official-gcc.git] / libgo / go / sync / cas.c
blobffcd133cb3a86480107ba9fe9d92312b14072125
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. */
7 #include <stdint.h>
9 _Bool cas (int32_t *, int32_t, int32_t) asm ("libgo_sync.sync.cas");
11 _Bool
12 cas (int32_t *ptr, int32_t old, int32_t new)
14 return __sync_bool_compare_and_swap (ptr, old, new);