Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI/LB] Add XBT_PUBLIC to load_balancer.h declarations
[simgrid.git] / tools / cmake / test_prog / prog_thread_storage.c
index edcab03..1ed7fac 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2010-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,15 +6,9 @@
 
 #include <stdio.h>
 
-#ifdef _MSC_VER
-__declspec(thread)
-#else 
-__thread 
-#endif
-int thread_specific_variable = 0;
+__thread int thread_specific_variable = 0;
 
 int main(void) {
-
   thread_specific_variable++;
   printf("%d\n", thread_specific_variable);
   return 0;