There are two ways to determine whether we support the message
passing interface, as described in POSIX 1003.1B standard.
The standard way is to use sysconf(3) and the DragonFly-specific
way is to check the value of p1003_1b.message_passing sysctl.
We make sure that both return consistent results with respect to
each other.
case _SC_MEMORY_PROTECTION:
return (_POSIX_MEMORY_PROTECTION);
case _SC_MESSAGE_PASSING:
-#if _POSIX_MESSAGE_PASSING == 0
- mib[0] = CTL_P1003_1B;
- mib[1] = CTL_P1003_1B_MESSAGE_PASSING;
- goto yesno;
-#else
return (_POSIX_MESSAGE_PASSING);
-#endif
case _SC_PRIORITIZED_IO:
#if _POSIX_PRIORITIZED_IO == 0
mib[0] = CTL_P1003_1B;
#include <sys/module.h>
#include <sys/sysproto.h>
#include <sys/sysctl.h>
+#include <sys/unistd.h>
MALLOC_DEFINE(M_P31B, "p1003.1b", "Posix 1003.1B");
{
(void) sched_attach();
p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE);
+ p31b_setcfg(CTL_P1003_1B_MESSAGE_PASSING, _POSIX_MESSAGE_PASSING);
}
SYSINIT(p31b, SI_SUB_P1003_1B, SI_ORDER_FIRST, p31binit, NULL);
#define _POSIX_MEMLOCK -1
#define _POSIX_MEMLOCK_RANGE 200112L
#define _POSIX_MEMORY_PROTECTION 200112L
-#define _POSIX_MESSAGE_PASSING -1
+#define _POSIX_MESSAGE_PASSING 200112L
#define _POSIX_MONOTONIC_CLOCK 200112L
#define _POSIX_NO_TRUNC 1
#define _POSIX_PRIORITIZED_IO -1