1*84d9c625SLionel Sambuc /* $NetBSD: atomic_init_cas.c,v 1.4 2013/08/21 03:00:56 matt Exp $ */
2b6cbf720SGianluca Guida
3b6cbf720SGianluca Guida /*-
4b6cbf720SGianluca Guida * Copyright (c) 2008 The NetBSD Foundation, Inc.
5b6cbf720SGianluca Guida * All rights reserved.
6b6cbf720SGianluca Guida *
7b6cbf720SGianluca Guida * Redistribution and use in source and binary forms, with or without
8b6cbf720SGianluca Guida * modification, are permitted provided that the following conditions
9b6cbf720SGianluca Guida * are met:
10b6cbf720SGianluca Guida * 1. Redistributions of source code must retain the above copyright
11b6cbf720SGianluca Guida * notice, this list of conditions and the following disclaimer.
12b6cbf720SGianluca Guida * 2. Redistributions in binary form must reproduce the above copyright
13b6cbf720SGianluca Guida * notice, this list of conditions and the following disclaimer in the
14b6cbf720SGianluca Guida * documentation and/or other materials provided with the distribution.
15b6cbf720SGianluca Guida *
16b6cbf720SGianluca Guida * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17b6cbf720SGianluca Guida * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18b6cbf720SGianluca Guida * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19b6cbf720SGianluca Guida * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20b6cbf720SGianluca Guida * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21b6cbf720SGianluca Guida * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22b6cbf720SGianluca Guida * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23b6cbf720SGianluca Guida * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24b6cbf720SGianluca Guida * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25b6cbf720SGianluca Guida * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26b6cbf720SGianluca Guida * POSSIBILITY OF SUCH DAMAGE.
27b6cbf720SGianluca Guida */
28b6cbf720SGianluca Guida
29b6cbf720SGianluca Guida /*
30b6cbf720SGianluca Guida * libc glue for atomic operations where the hardware _does_ provide
31b6cbf720SGianluca Guida * compare-and-swap.
32b6cbf720SGianluca Guida */
33b6cbf720SGianluca Guida
34b6cbf720SGianluca Guida #include <sys/cdefs.h>
35*84d9c625SLionel Sambuc __RCSID("$NetBSD: atomic_init_cas.c,v 1.4 2013/08/21 03:00:56 matt Exp $");
36b6cbf720SGianluca Guida
37b6cbf720SGianluca Guida void __libc_atomic_init(void) __attribute__ ((visibility("hidden")));
38b6cbf720SGianluca Guida
39*84d9c625SLionel Sambuc void __section(".text.startup")
__libc_atomic_init(void)40b6cbf720SGianluca Guida __libc_atomic_init(void)
41b6cbf720SGianluca Guida {
42b6cbf720SGianluca Guida
43b6cbf720SGianluca Guida /* nothing to do */
44b6cbf720SGianluca Guida }
45