1*71d0bcc6Sjoerg /* $NetBSD: t_tls_static_helper.c,v 1.2 2012/01/17 20:34:57 joerg Exp $ */
2aad59997Sjoerg /*-
3aad59997Sjoerg * Copyright (c) 2011 The NetBSD Foundation, Inc.
4aad59997Sjoerg * All rights reserved.
5aad59997Sjoerg *
6aad59997Sjoerg * This code is derived from software contributed to The NetBSD Foundation
7aad59997Sjoerg * by Joerg Sonnenberger.
8aad59997Sjoerg *
9aad59997Sjoerg * Redistribution and use in source and binary forms, with or without
10aad59997Sjoerg * modification, are permitted provided that the following conditions
11aad59997Sjoerg * are met:
12aad59997Sjoerg *
13aad59997Sjoerg * 1. Redistributions of source code must retain the above copyright
14aad59997Sjoerg * notice, this list of conditions and the following disclaimer.
15aad59997Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
16aad59997Sjoerg * notice, this list of conditions and the following disclaimer in
17aad59997Sjoerg * the documentation and/or other materials provided with the
18aad59997Sjoerg * distribution.
19aad59997Sjoerg *
20aad59997Sjoerg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21aad59997Sjoerg * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22aad59997Sjoerg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23aad59997Sjoerg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24aad59997Sjoerg * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25aad59997Sjoerg * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
26aad59997Sjoerg * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27aad59997Sjoerg * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28aad59997Sjoerg * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29aad59997Sjoerg * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30aad59997Sjoerg * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31aad59997Sjoerg * SUCH DAMAGE.
32aad59997Sjoerg */
33aad59997Sjoerg
34aad59997Sjoerg #include <sys/cdefs.h>
35*71d0bcc6Sjoerg __RCSID("$NetBSD: t_tls_static_helper.c,v 1.2 2012/01/17 20:34:57 joerg Exp $");
36aad59997Sjoerg
37aad59997Sjoerg #include <sys/tls.h>
38aad59997Sjoerg
39*71d0bcc6Sjoerg #ifdef __HAVE_NO___THREAD
40aad59997Sjoerg #define __thread
41aad59997Sjoerg #endif
42aad59997Sjoerg
43aad59997Sjoerg extern __thread int var1;
44aad59997Sjoerg extern __thread int var2;
45aad59997Sjoerg
46aad59997Sjoerg void testf_helper(void);
47aad59997Sjoerg
48aad59997Sjoerg void
testf_helper(void)49aad59997Sjoerg testf_helper(void)
50aad59997Sjoerg {
51aad59997Sjoerg var1 = -1;
52aad59997Sjoerg var2 = -1;
53aad59997Sjoerg }
54