projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added function to retrieve irn ops
[libfirm]
/
ir
/
be
/
test
/
thread.c
diff --git
a/ir/be/test/thread.c
b/ir/be/test/thread.c
index
33012f0
..
a97d600
100644
(file)
--- a/
ir/be/test/thread.c
+++ b/
ir/be/test/thread.c
@@
-1,6
+1,18
@@
+#ifdef _WIN32
#define __thread __declspec( thread )
__thread int tls_i = 1;
int test(void) {
return tls_i;
#define __thread __declspec( thread )
__thread int tls_i = 1;
int test(void) {
return tls_i;
-}
\ No newline at end of file
+}
+#else
+int test() {
+ return 1;
+}
+#endif
+
+int main()
+{
+ printf("Result: %d\n", test());
+ return 0;
+}