Subversion Repositories HelenOS-historic

Rev

Rev 1091 | Rev 1282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1091 Rev 1259
Line 13... Line 13...
13
    ipc_callid_t callid;
13
    ipc_callid_t callid;
14
   
14
   
15
    ipcarg_t retval, arg1, arg2;
15
    ipcarg_t retval, arg1, arg2;
16
 
16
 
17
    printf("NS:Name service started.\n");
17
    printf("NS:Name service started.\n");
-
 
18
//  ipc_register_irq(1);
18
    while (1) {
19
    while (1) {
19
        callid = ipc_wait_for_call(&call, 0);
20
        callid = ipc_wait_for_call(&call, 0);
20
        printf("NS:Call phone=%lX..", call.phoneid);
21
        printf("NS:Call phone=%lX..", call.phoneid);
21
        switch (IPC_GET_METHOD(call)) {
22
        switch (IPC_GET_METHOD(call)) {
-
 
23
        case IPC_M_INTERRUPT:
-
 
24
            printf("GOT INTERRUPT\n");
-
 
25
            break;
22
        case IPC_M_PHONE_HUNGUP:
26
        case IPC_M_PHONE_HUNGUP:
23
            printf("Phone hung up.\n");
27
            printf("Phone hung up.\n");
24
            retval = 0;
28
            retval = 0;
25
            break;
29
            break;
26
        case IPC_M_CONNECT_TO_ME:
30
        case IPC_M_CONNECT_TO_ME:
Line 52... Line 56...
52
        default:
56
        default:
53
            printf("Unknown method: %zd\n", IPC_GET_METHOD(call));
57
            printf("Unknown method: %zd\n", IPC_GET_METHOD(call));
54
            retval = ENOENT;
58
            retval = ENOENT;
55
            break;
59
            break;
56
        }
60
        }
-
 
61
        if (! (callid & IPC_CALLID_NOTIFICATION))
57
        ipc_answer(callid, retval, arg1, arg2);
62
            ipc_answer(callid, retval, arg1, arg2);
58
    }
63
    }
59
}
64
}