diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-10-27 02:58:22 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-10-31 09:18:21 (GMT) |
commit | 05380b49b7337df2eb11f834a8a9b01b0ab1cbe7 (patch) | |
tree | 59b582107829d310691a210af3dfce3280235da1 /src/pthreads-libgomp-test.c | |
parent | 0ad42f9aa49c118b34fdd324a471df38d389e6c3 (diff) | |
download | mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.zip mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.tar.gz mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.tar.bz2 |
gcc pthreads: build pthreads and mingw-w64 headers inline and enable libgomp
* fixes "~winpthreads changes ~pthread_signal.h" etc. reported by build-pkg
mingw-w64 installs dummy headers if winpthreads isn't built
* enables libgomp to avoid double-build (see #331)
* no change in openmp-validation (still 20 failures - taken with a grain of
salt as the batch file test runner isn't a reliable perl substitute)
* pthreads virtual package kept for future testing
Diffstat (limited to 'src/pthreads-libgomp-test.c')
-rw-r--r-- | src/pthreads-libgomp-test.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pthreads-libgomp-test.c b/src/pthreads-libgomp-test.c new file mode 100644 index 0000000..20068e6 --- /dev/null +++ b/src/pthreads-libgomp-test.c @@ -0,0 +1,21 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include <omp.h> +#include <stdio.h> + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + omp_set_num_threads(4); + + #pragma omp parallel + fprintf(stderr, "Hello from thread %d, nthreads %d\n", + omp_get_thread_num(), omp_get_num_threads()); + + return 0; +} |