123456789101112131415161718192021222324252627(**************************************************************************)(* *)(* OCaml *)(* *)(* Stephen Dolan, University of Cambridge *)(* *)(* Copyright 2017-2018 University of Cambridge. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)type!'atexternalmake:'a->'at="%makemutable"externalmake_contended:'a->'at="caml_atomic_make_contended"externalget:'at->'a="%atomic_load"externalexchange:'at->'a->'a="%atomic_exchange"externalcompare_and_set:'at->'a->'a->bool="%atomic_cas"externalfetch_and_add:intt->int->int="%atomic_fetch_add"externalignore:'a->unit="%ignore"letsetrx=ignore(exchangerx)letincrr=ignore(fetch_and_addr1)letdecrr=ignore(fetch_and_addr(-1))