Changes in uspace/app/trace/ipcp.c [09ab0a9a:5e801dc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/ipcp.c
r09ab0a9a r5e801dc 72 72 proto_t *proto_unknown; /**< Protocol with no known methods. */ 73 73 74 static size_t pending_call_key_hash( void *key)75 { 76 c ap_call_handle_t *chandle = (cap_call_handle_t *)key;77 return CAP_HANDLE_RAW(*chandle);74 static size_t pending_call_key_hash(const void *key) 75 { 76 const cap_call_handle_t *chandle = key; 77 return cap_handle_raw(*chandle); 78 78 } 79 79 … … 81 81 { 82 82 pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link); 83 return CAP_HANDLE_RAW(hs->call_handle);84 } 85 86 static bool pending_call_key_equal( void *key, const ht_link_t *item)87 { 88 c ap_call_handle_t *chandle = (cap_call_handle_t *)key;83 return cap_handle_raw(hs->call_handle); 84 } 85 86 static bool pending_call_key_equal(const void *key, const ht_link_t *item) 87 { 88 const cap_call_handle_t *chandle = key; 89 89 pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link); 90 90 … … 104 104 // XXX: there is no longer a limit on the number of phones as phones are 105 105 // now handled using capabilities 106 if ( CAP_HANDLE_RAW(phone) < 0 || CAP_HANDLE_RAW(phone) >= MAX_PHONE)106 if (cap_handle_raw(phone) < 0 || cap_handle_raw(phone) >= MAX_PHONE) 107 107 return; 108 connections[ CAP_HANDLE_RAW(phone)].server = server;109 connections[ CAP_HANDLE_RAW(phone)].proto = proto;110 have_conn[ CAP_HANDLE_RAW(phone)] = 1;108 connections[cap_handle_raw(phone)].server = server; 109 connections[cap_handle_raw(phone)].proto = proto; 110 have_conn[cap_handle_raw(phone)] = 1; 111 111 } 112 112 113 113 void ipcp_connection_clear(cap_phone_handle_t phone) 114 114 { 115 have_conn[ CAP_HANDLE_RAW(phone)] = 0;116 connections[ CAP_HANDLE_RAW(phone)].server = 0;117 connections[ CAP_HANDLE_RAW(phone)].proto = NULL;115 have_conn[cap_handle_raw(phone)] = 0; 116 connections[cap_handle_raw(phone)].server = 0; 117 connections[cap_handle_raw(phone)].proto = NULL; 118 118 } 119 119 … … 184 184 int i; 185 185 186 if (have_conn[ CAP_HANDLE_RAW(phandle)])187 proto = connections[ CAP_HANDLE_RAW(phandle)].proto;186 if (have_conn[cap_handle_raw(phandle)]) 187 proto = connections[cap_handle_raw(phandle)].proto; 188 188 else 189 189 proto = NULL; … … 194 194 printf("Call handle: %p, phone: %p, proto: %s, method: ", 195 195 chandle, phandle, (proto ? proto->name : "n/a")); 196 ipc_m_print(proto, IPC_GET_IMETHOD(*call));196 ipc_m_print(proto, ipc_get_imethod(call)); 197 197 printf(" args: (%" PRIun ", %" PRIun ", %" PRIun ", " 198 198 "%" PRIun ", %" PRIun ")\n", … … 203 203 204 204 if (proto != NULL) { 205 oper = proto_get_oper(proto, IPC_GET_IMETHOD(*call));205 oper = proto_get_oper(proto, ipc_get_imethod(call)); 206 206 } else { 207 207 oper = NULL; … … 262 262 263 263 phone = pcall->phone_handle; 264 method = IPC_GET_IMETHOD(pcall->question);265 retval = IPC_GET_RETVAL(*answer);264 method = ipc_get_imethod(&pcall->question); 265 retval = ipc_get_retval(answer); 266 266 267 267 resp = answer->args; … … 270 270 printf("Response to %p: retval=%s, args = (%" PRIun ", " 271 271 "%" PRIun ", %" PRIun ", %" PRIun ", %" PRIun ")\n", 272 call_handle, str_error_name(retval), IPC_GET_ARG1(*answer),273 IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),274 IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));272 call_handle, str_error_name(retval), ipc_get_arg1(answer), 273 ipc_get_arg2(answer), ipc_get_arg3(answer), 274 ipc_get_arg4(answer), ipc_get_arg5(answer)); 275 275 } 276 276 … … 305 305 (retval == 0)) { 306 306 /* Connected to a service (through NS) */ 307 service = IPC_GET_ARG2(pcall->question);307 service = ipc_get_arg2(&pcall->question); 308 308 proto = proto_get_by_srv(service); 309 309 if (proto == NULL) 310 310 proto = proto_unknown; 311 311 312 cphone = (cap_phone_handle_t) IPC_GET_ARG5(*answer);312 cphone = (cap_phone_handle_t) ipc_get_arg5(answer); 313 313 if ((display_mask & DM_SYSTEM) != 0) { 314 314 printf("Registering connection (phone %p, protocol: %s)\n", cphone,
Note:
See TracChangeset
for help on using the changeset viewer.