X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8cb88f1aa918e7a2c57f45fba3cd25b2816b20fc..4bc88c13ed1b358c2cd32e09b85e52e5fdb21b05:/tools/cmake/test_prog/prog_thread_storage.c diff --git a/tools/cmake/test_prog/prog_thread_storage.c b/tools/cmake/test_prog/prog_thread_storage.c new file mode 100644 index 0000000000..edcab030ca --- /dev/null +++ b/tools/cmake/test_prog/prog_thread_storage.c @@ -0,0 +1,21 @@ +/* Copyright (c) 2010-2011, 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#include + +#ifdef _MSC_VER +__declspec(thread) +#else +__thread +#endif +int thread_specific_variable = 0; + +int main(void) { + + thread_specific_variable++; + printf("%d\n", thread_specific_variable); + return 0; +}