Module Name: src
Committed By: joerg
Date: Sun Oct 20 13:30:50 UTC 2013
Modified Files:
src/tests/lib/libc/tls_dso: h_tls_dynamic.c
Log Message:
Force use of static TLS space.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/tls_dso/h_tls_dynamic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/tls_dso/h_tls_dynamic.c
diff -u src/tests/lib/libc/tls_dso/h_tls_dynamic.c:1.3 src/tests/lib/libc/tls_dso/h_tls_dynamic.c:1.4
--- src/tests/lib/libc/tls_dso/h_tls_dynamic.c:1.3 Tue Jan 17 20:34:57 2012
+++ src/tests/lib/libc/tls_dso/h_tls_dynamic.c Sun Oct 20 13:30:50 2013
@@ -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
__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;
}