Force use of static TLS space.

This commit is contained in:
joerg 2013-10-20 13:30:50 +00:00
parent 2327114209
commit 744547edc2
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: h_tls_dynamic.c,v 1.3 2012/01/17 20:34:57 joerg Exp $ */
/* $NetBSD: h_tls_dynamic.c,v 1.4 2013/10/20 13:30:50 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: h_tls_dynamic.c,v 1.3 2012/01/17 20:34:57 joerg Exp $");
__RCSID("$NetBSD: h_tls_dynamic.c,v 1.4 2013/10/20 13:30:50 joerg Exp $");
#include <unistd.h>
#include <sys/tls.h>
@ -43,6 +43,7 @@ __RCSID("$NetBSD: h_tls_dynamic.c,v 1.3 2012/01/17 20:34:57 joerg Exp $");
__thread int var1 = 1;
__thread int var2;
__attribute__((__tls_model__("initial-exec"))) __thread int var3;
__thread pid_t (*dso_var1)(void) = getpid;
@ -53,4 +54,5 @@ testf_dso_helper(int x, int y)
{
var1 = x;
var2 = y;
var3 = x;
}