Rev 2531 | Rev 2568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2531 | Rev 2541 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | { |
53 | { |
54 | return async_get_call_timeout(data, 0); |
54 | return async_get_call_timeout(data, 0); |
55 | } |
55 | } |
56 | 56 | ||
57 | aid_t async_send_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
57 | aid_t async_send_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
58 | ipc_call_t *dataptr); |
58 | ipc_call_t *dataptr); |
59 | aid_t async_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
59 | aid_t async_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
60 | ipcarg_t arg3, ipc_call_t *dataptr); |
60 | ipcarg_t arg3, ipc_call_t *dataptr); |
61 | void async_wait_for(aid_t amsgid, ipcarg_t *result); |
61 | void async_wait_for(aid_t amsgid, ipcarg_t *result); |
62 | int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout); |
62 | int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout); |
63 | 63 | ||
64 | /** Pseudo-synchronous message sending |
64 | /** Pseudo-synchronous message sending |
65 | * |
65 | * |
66 | * Send message through IPC, wait in the event loop, until it is received |
66 | * Send message through IPC, wait in the event loop, until it is received |
67 | * |
67 | * |
68 | * @return Return code of message |
68 | * @return Return code of message |
69 | */ |
69 | */ |
70 | static inline ipcarg_t async_req_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2) |
70 | static inline ipcarg_t async_req_2(int phoneid, ipcarg_t method, ipcarg_t arg1, |
- | 71 | ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2) |
|
71 | { |
72 | { |
72 | ipc_call_t result; |
73 | ipc_call_t result; |
73 | ipcarg_t rc; |
74 | ipcarg_t rc; |
74 | 75 | ||
75 | aid_t eid = async_send_2(phoneid, method, arg1, arg2, &result); |
76 | aid_t eid = async_send_2(phoneid, method, arg1, arg2, &result); |
Line 78... | Line 79... | ||
78 | *r1 = IPC_GET_ARG1(result); |
79 | *r1 = IPC_GET_ARG1(result); |
79 | if (r2) |
80 | if (r2) |
80 | *r2 = IPC_GET_ARG2(result); |
81 | *r2 = IPC_GET_ARG2(result); |
81 | return rc; |
82 | return rc; |
82 | } |
83 | } |
- | 84 | #define async_req(phoneid, method, arg1, r1) \ |
|
83 | #define async_req(phoneid, method, arg1, r1) async_req_2(phoneid, method, arg1, 0, r1, 0) |
85 | async_req_2(phoneid, method, arg1, 0, r1, 0) |
84 | 86 | ||
85 | static inline ipcarg_t async_req_3(int phoneid, ipcarg_t method, ipcarg_t arg1, |
87 | static inline ipcarg_t async_req_3(int phoneid, ipcarg_t method, ipcarg_t arg1, |
86 | ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1, |
88 | ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1, ipcarg_t *r2, ipcarg_t *r3) |
87 | ipcarg_t *r2, ipcarg_t *r3) |
- | |
88 | { |
89 | { |
89 | ipc_call_t result; |
90 | ipc_call_t result; |
90 | ipcarg_t rc; |
91 | ipcarg_t rc; |
91 | 92 | ||
92 | aid_t eid = async_send_3(phoneid, method, arg1, arg2, arg3, &result); |
93 | aid_t eid = async_send_3(phoneid, method, arg1, arg2, arg3, &result); |
Line 111... | Line 112... | ||
111 | int _async_init(void); |
112 | int _async_init(void); |
112 | 113 | ||
113 | 114 | ||
114 | /* Primitve functions for IPC communication */ |
115 | /* Primitve functions for IPC communication */ |
115 | void async_msg_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
116 | void async_msg_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
116 | ipcarg_t arg3); |
117 | ipcarg_t arg3); |
117 | void async_msg_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2); |
118 | void async_msg_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2); |
118 | #define async_msg(ph, m, a1) async_msg_2(ph, m, a1, 0) |
119 | #define async_msg(ph, m, a1) async_msg_2(ph, m, a1, 0) |
119 | 120 | ||
120 | static inline void async_serialize_start(void) |
121 | static inline void async_serialize_start(void) |
121 | { |
122 | { |