arch_register_class_put() is only used locally
[libfirm] / ir / be / test / thread.c
index a97d600..f48f60a 100644 (file)
@@ -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;
 }