arch_register_class_put() is only used locally
[libfirm] / ir / be / test / thread.c
index 33012f0..f48f60a 100644 (file)
@@ -1,6 +1,18 @@
+#ifdef _WIN32
 #define __thread   __declspec( thread )
-__thread int tls_i = 1;
+#endif
 
-int test(void) {
-       return tls_i;
-}
\ No newline at end of file
+__thread int tls_i[10];
+__thread int tls_j = 5;
+
+int test(int i) {
+       tls_j = i;
+       return tls_i[i];
+}
+
+int main()
+{
+    printf("tls_i: %d\n", test(3));
+    printf("tls_j: %d\n", tls_j);
+    return 0;
+}