Subversion Repositories HelenOS

Rev

Rev 2871 | Rev 2873 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2871 Rev 2872
Line 7... Line 7...
7
#include <stdio.h>
7
#include <stdio.h>
8
 
8
 
9
#include "ipc_desc.h"
9
#include "ipc_desc.h"
10
#include "ipc.h"
10
#include "ipc.h"
11
 
11
 
12
void ipc_parse_call_out(int phone, ipc_call_t *call)
12
void ipc_m_print(ipcarg_t method)
13
{
13
{
-
 
14
    ipc_m_desc_t *desc;
-
 
15
 
-
 
16
    /* FIXME: too slow */
-
 
17
    desc = ipc_methods;
-
 
18
    while (desc->number != 0) {
-
 
19
        if (desc->number == method) {
-
 
20
            printf("%s (%d)", desc->name, method);
-
 
21
            return;
-
 
22
        }
-
 
23
 
-
 
24
        ++desc;
-
 
25
    }
-
 
26
 
-
 
27
    printf("%d", method);
-
 
28
}
-
 
29
 
-
 
30
void ipc_parse_call_out(int phone, ipc_call_t *call, ipc_callid_t hash)
-
 
31
{
14
    printf("ipc_parse_call_out()\n");
32
//  printf("ipc_parse_call_out()\n");
15
    printf("phone: %d, method: %d, args: (%u, %u, %u, %u, %u)\n",
33
    printf("call id: 0x%x, phone: %d, method: ", hash, phone);
16
        phone,
-
 
17
        IPC_GET_METHOD(*call),
34
    ipc_m_print(IPC_GET_METHOD(*call));
-
 
35
    printf(" args: (%u, %u, %u, %u, %u)\n",
18
        IPC_GET_ARG1(*call),
36
        IPC_GET_ARG1(*call),
19
        IPC_GET_ARG2(*call),
37
        IPC_GET_ARG2(*call),
20
        IPC_GET_ARG3(*call),
38
        IPC_GET_ARG3(*call),
21
        IPC_GET_ARG4(*call),
39
        IPC_GET_ARG4(*call),
22
        IPC_GET_ARG5(*call)
40
        IPC_GET_ARG5(*call)
23
    );
41
    );
24
}
42
}
25
 
43
 
26
void ipc_parse_call_in(ipc_call_t *call)
44
void ipc_parse_call_in(ipc_call_t *call, ipc_callid_t hash)
27
{
45
{
28
    printf("ipc_parse_call_in()\n");
46
//  printf("ipc_parse_call_in()\n");
29
    printf("phone: %d, method: %d, args: (%u, %u, %u, %u, %u)\n",
47
/*  printf("phone: %d, method: ", call->in_phone_hash);
30
        call->in_phone_hash,
48
    ipc_m_print(IPC_GET_METHOD(*call));
31
        IPC_GET_METHOD(*call),
49
    printf(" args: (%u, %u, %u, %u, %u)\n",
32
        IPC_GET_ARG1(*call),
50
        IPC_GET_ARG1(*call),
33
        IPC_GET_ARG2(*call),
51
        IPC_GET_ARG2(*call),
34
        IPC_GET_ARG3(*call),
52
        IPC_GET_ARG3(*call),
35
        IPC_GET_ARG4(*call),
53
        IPC_GET_ARG4(*call),
36
        IPC_GET_ARG5(*call)
54
        IPC_GET_ARG5(*call)
37
    );
55
    );*/
38
}
56
}
39
 
57
 
-
 
58
void ipc_parse_call_sync(int phone, ipc_call_t *call, ipc_call_t *answer)
-
 
59
{
-
 
60
    ipc_parse_call_out(phone, call, 0);
-
 
61
    ipc_parse_call_in(answer, 0);
-
 
62
}
-
 
63
 
-
 
64
void ipc_parse_hangup(int phone, int rc)
-
 
65
{
-
 
66
    printf("hangup phone %d -> %d\n", phone, rc);
-
 
67
}
40
 
68
 
41
/** @}
69
/** @}
42
 */
70
 */