3f38115c7b
. define _MINIX_SYSTEM for all system code from minix.service.mk . hide some system-level declarations and definitions behind _MINIX_SYSTEM to cleanly fix host tool build problems on Minix (such as: NONE being defined and paddr_t being used but not declared) . the similar definition _SYSTEM is unsuitable as it changes the values of errno definitions Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
39 lines
651 B
C
39 lines
651 B
C
|
|
#define _MINIX_SYSTEM
|
|
|
|
#include <stdio.h>
|
|
#include <minix/endpoint.h>
|
|
#include <minix/sys_config.h>
|
|
int max_error = 1;
|
|
#include "common.h"
|
|
|
|
|
|
void test39a(void);
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
start(39);
|
|
test39a();
|
|
quit();
|
|
return(-1); /* Unreachable */
|
|
}
|
|
|
|
void test39a()
|
|
{
|
|
int g, p;
|
|
|
|
subtest = 1;
|
|
|
|
for (g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
|
|
for (p = -MAX_NR_TASKS; p < MAX_NR_PROCS; p++) {
|
|
endpoint_t ept;
|
|
int mg, mp;
|
|
ept = _ENDPOINT(g, p);
|
|
mg = _ENDPOINT_G(ept);
|
|
mp = _ENDPOINT_P(ept);
|
|
if (mg != g || mp != p) e(1);
|
|
if (g == 0 && ept != p) e(2);
|
|
if (ept == ANY || ept == SELF || ept == NONE) e(3);
|
|
}
|
|
}
|
|
}
|