From 5b0c5a1f9e78241b946a2f997968f609302ec80f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christophe=20Thi=C3=A9ry?= Date: Fri, 22 Apr 2011 16:43:35 +0200 Subject: [PATCH 1/1] Add a simple test to check whether the compiler accepts __thread --- buildtools/Cmake/test_prog/prog_thread_storage.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 buildtools/Cmake/test_prog/prog_thread_storage.c 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; +} -- 2.20.1