From 68567b88ee8f9e395e0c1f0a565affe8a1d4d68b Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 1 Aug 2010 01:05:53 +0200 Subject: Move files to libpthread/ for inclusion along hurd --- libpthread/tests/test-12.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libpthread/tests/test-12.c (limited to 'libpthread/tests/test-12.c') diff --git a/libpthread/tests/test-12.c b/libpthread/tests/test-12.c new file mode 100644 index 00000000..2b784908 --- /dev/null +++ b/libpthread/tests/test-12.c @@ -0,0 +1,29 @@ +/* Test concurrency level. */ + +#define _GNU_SOURCE + +#include +#include +#include +#include + +int +main (int argc, char **argv) +{ + int i; + int err; + + i = pthread_getconcurrency (); + assert (i == 0); + + err = pthread_setconcurrency (-1); + assert (err == EINVAL); + + err = pthread_setconcurrency (4); + assert (err == 0); + + i = pthread_getconcurrency (); + assert (i == 4); + + return 0; +} -- cgit v1.2.3