semaphore.h: Add SEM_VALUE_MAX.
It's specified in POSIX, and FreeBSD puts it in this file. Distinguish it from _POSIX_SEM_VALUE_MAX (which is really a "minimum value this can have" as specified in POSIX.)
This commit is contained in:
@@ -679,7 +679,7 @@ _user_realtime_sem_open(const char* userName, int openFlagsOrShared,
|
||||
if (context == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
if (semCount > MAX_POSIX_SEM_VALUE)
|
||||
if (semCount > SEM_VALUE_MAX)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
// userSem must always be given
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <semaphore.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -96,7 +97,7 @@ __sysconf(int name)
|
||||
// unlimited, instead of _POSIX_SEM_NSEMS_MAX
|
||||
return -1;
|
||||
case _SC_SEM_VALUE_MAX:
|
||||
return _POSIX_SEM_VALUE_MAX;
|
||||
return SEM_VALUE_MAX;
|
||||
case _SC_IOV_MAX:
|
||||
return IOV_MAX;
|
||||
case _SC_NPROCESSORS_CONF:
|
||||
|
||||
Reference in New Issue
Block a user