From: Christophe ThiƩry Date: Fri, 22 Apr 2011 14:43:35 +0000 (+0200) Subject: Add a simple test to check whether the compiler accepts __thread X-Git-Tag: v3_6_rc3~106 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5b0c5a1f9e78241b946a2f997968f609302ec80f Add a simple test to check whether the compiler accepts __thread --- diff --git a/buildtools/Cmake/test_prog/prog_thread_storage.c b/buildtools/Cmake/test_prog/prog_thread_storage.c new file mode 100644 index 0000000000..060be0a484 --- /dev/null +++ b/buildtools/Cmake/test_prog/prog_thread_storage.c @@ -0,0 +1,16 @@ +/* Copyright (c) 2010. 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 + +__thread int thread_specific_variable = 0; + +int main(void) { + + thread_specific_variable++; + printf("%d\n", thread_specific_variable); + return 0; +}