disallow cpu time clocks as condattr clock values

This commit is contained in:
Rich Felker 2011-03-08 02:32:42 -05:00
parent 5d0d6d9836
commit 9d5251f72b

View File

@ -2,7 +2,7 @@
int pthread_condattr_setclock(pthread_condattr_t *a, clockid_t clk)
{
if (clk < 0) return EINVAL;
if (clk < 0 || clk-2U < 2) return EINVAL;
*a &= 0x80000000;
*a |= clk;
return 0;