Blame src/atomic_ops/sysdeps/loadstore/atomic_store.template

Packit fe9d6e
/*
Packit fe9d6e
 * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
Packit fe9d6e
 *
Packit fe9d6e
 * Permission is hereby granted, free of charge, to any person obtaining a copy
Packit fe9d6e
 * of this software and associated documentation files (the "Software"), to deal
Packit fe9d6e
 * in the Software without restriction, including without limitation the rights
Packit fe9d6e
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
Packit fe9d6e
 * copies of the Software, and to permit persons to whom the Software is
Packit fe9d6e
 * furnished to do so, subject to the following conditions:
Packit fe9d6e
 *
Packit fe9d6e
 * The above copyright notice and this permission notice shall be included in
Packit fe9d6e
 * all copies or substantial portions of the Software.
Packit fe9d6e
 *
Packit fe9d6e
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit fe9d6e
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit fe9d6e
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit fe9d6e
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit fe9d6e
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
Packit fe9d6e
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Packit fe9d6e
 * SOFTWARE.
Packit fe9d6e
 */
Packit fe9d6e
Packit fe9d6e
/* Definitions for architectures on which stores of given type are      */
Packit fe9d6e
/* atomic (either for suitably aligned data only or for any legal       */
Packit fe9d6e
/* alignment).                                                          */
Packit fe9d6e
Packit fe9d6e
AO_INLINE void
Packit fe9d6e
AO_XSIZE_store(volatile XCTYPE *addr, XCTYPE new_val)
Packit fe9d6e
{
Packit fe9d6e
# ifdef AO_ACCESS_XSIZE_CHECK_ALIGNED
Packit fe9d6e
    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
Packit fe9d6e
# endif
Packit fe9d6e
  *(XCTYPE *)addr = new_val;
Packit fe9d6e
}
Packit fe9d6e
#define AO_HAVE_XSIZE_store