diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-05-30 11:31:07 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-05-30 11:31:07 -0400 |
commit | ddd87b2f10baf35ed32917bd488be8bf53ad0cc3 (patch) | |
tree | f744f682dfdaaf2ee5cbb8b43d8c5c4403cc27cf /src/thread | |
parent | 11c531e21de9c417166da934898ea7225a758fdf (diff) | |
download | musl-ddd87b2f10baf35ed32917bd488be8bf53ad0cc3.tar.gz musl-ddd87b2f10baf35ed32917bd488be8bf53ad0cc3.tar.bz2 musl-ddd87b2f10baf35ed32917bd488be8bf53ad0cc3.tar.xz musl-ddd87b2f10baf35ed32917bd488be8bf53ad0cc3.zip |
implement pthread_[sg]etconcurrency.
there is a resource limit of 0 bits to store the concurrency level
requested. thus any positive level exceeds a resource limit, resulting
in EAGAIN. :-)
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/pthread_getconcurrency.c | 6 | ||||
-rw-r--r-- | src/thread/pthread_setconcurrency.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/thread/pthread_getconcurrency.c b/src/thread/pthread_getconcurrency.c new file mode 100644 index 00000000..269429a8 --- /dev/null +++ b/src/thread/pthread_getconcurrency.c @@ -0,0 +1,6 @@ +#include <pthread.h> + +int pthread_getconcurrency() +{ + return 0; +} diff --git a/src/thread/pthread_setconcurrency.c b/src/thread/pthread_setconcurrency.c new file mode 100644 index 00000000..091abf98 --- /dev/null +++ b/src/thread/pthread_setconcurrency.c @@ -0,0 +1,9 @@ +#include <pthread.h> +#include <errno.h> + +int pthread_setconcurrency(int val) +{ + if (val < 0) return EINVAL; + if (val > 0) return EAGAIN; + return 0; +} |