projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd220e6
)
updated
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 31 Aug 2006 12:35:10 +0000
(12:35 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 31 Aug 2006 12:35:10 +0000
(12:35 +0000)
ir/be/test/thread.c
patch
|
blob
|
history
diff --git
a/ir/be/test/thread.c
b/ir/be/test/thread.c
index
a97d600
..
27e48f9
100644
(file)
--- a/
ir/be/test/thread.c
+++ b/
ir/be/test/thread.c
@@
-1,18
+1,18
@@
#ifdef _WIN32
#define __thread __declspec( thread )
-__thread int tls_i = 1;
+#endif
-int test(void) {
-
return tls_i
;
-}
-#else
-int test() {
-
return 1
;
+__thread int tls_i[10];
+
__thread int tls_j = 5
;
+
+int test(int i) {
+ tls_j = i;
+
return tls_i[i]
;
}
-#endif
int main()
{
- printf("Result: %d\n", test());
+ printf("tls_i: %d\n", test(3));
+ printf("tls_j: %d\n", tls_j);
return 0;
}