2006-03-01 16:28:07 +01:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <minix/endpoint.h>
|
2006-03-07 16:44:00 +01:00
|
|
|
#include <minix/sys_config.h>
|
2006-03-01 16:28:07 +01:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int g, p;
|
|
|
|
|
|
|
|
printf("Test 41 ");
|
|
|
|
|
|
|
|
for(g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
|
2006-03-07 16:44:00 +01:00
|
|
|
for(p = -NR_TASKS; p < _NR_PROCS; p++) {
|
2006-03-01 16:28:07 +01:00
|
|
|
int e, mg, mp;
|
|
|
|
e = _ENDPOINT(g, p);
|
|
|
|
mg = _ENDPOINT_G(e);
|
|
|
|
mp = _ENDPOINT_P(e);
|
|
|
|
if(mg != g || mp != p) {
|
|
|
|
printf("%d != %d || %d != %d\n", mg, g, mp, p);
|
|
|
|
return 1;
|
|
|
|
}
|
2006-03-07 16:44:00 +01:00
|
|
|
if(g == 0 && e != p) {
|
|
|
|
printf("%d != %d and g=0\n", e, p);
|
|
|
|
return 1;
|
|
|
|
}
|
2006-03-01 16:28:07 +01:00
|
|
|
if(e == ANY || e == SELF || e == NONE) {
|
2006-03-07 16:44:00 +01:00
|
|
|
printf("endpoint (%d,%d) is %d; ANY, SELF or NONE\n",
|
|
|
|
g, p, e);
|
|
|
|
return 1;
|
2006-03-01 16:28:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("ok\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|