提交 ddd87b2f 编写于 作者: R Rich Felker

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. :-)
上级 11c531e2
......@@ -178,6 +178,9 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
int pthread_getconcurrency(void);
int pthread_setconcurrency(int);
#include <bits/pthread.h>
int __setjmp(void *);
......
#include <pthread.h>
int pthread_getconcurrency()
{
return 0;
}
#include <pthread.h>
#include <errno.h>
int pthread_setconcurrency(int val)
{
if (val < 0) return EINVAL;
if (val > 0) return EAGAIN;
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册