don't need to explicitly enable lance any more.
[minix.git] / test / test39.c
blobcd99ff7cbedd1ee1f7ff6494cd1eb24b8cf65f91
2 #include <stdio.h>
3 #include <minix/endpoint.h>
4 #include <minix/sys_config.h>
6 int main(int argc, char *argv[])
8 int g, p;
10 printf("Test 39 ");
12 for(g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
13 for(p = -NR_TASKS; p < _NR_PROCS; p++) {
14 int e, mg, mp;
15 e = _ENDPOINT(g, p);
16 mg = _ENDPOINT_G(e);
17 mp = _ENDPOINT_P(e);
18 if(mg != g || mp != p) {
19 printf("%d != %d || %d != %d\n", mg, g, mp, p);
20 return 1;
22 if(g == 0 && e != p) {
23 printf("%d != %d and g=0\n", e, p);
24 return 1;
26 if(e == ANY || e == SELF || e == NONE) {
27 printf("endpoint (%d,%d) is %d; ANY, SELF or NONE\n",
28 g, p, e);
29 return 1;
34 printf("ok\n");
36 return 0;