Changeset 20614d0 in mainline
- Timestamp:
- 2007-11-03T14:59:41Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 828d215
- Parents:
- 4d21cf8
- Location:
- uspace
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/ipc/ipc.h
r4d21cf8 r20614d0 53 53 54 54 #define ipc_call_sync_2(phoneid, method, arg1, arg2, res1, res2) \ 55 ipc_call_sync_3((phoneid), (method), (arg1), (arg2), 0, (res1), (res2),\56 0)55 ipc_call_sync_3((phoneid), (method), (arg1), (arg2), 0, (res1), \ 56 (res2), 0) 57 57 extern int ipc_call_sync_3(int phoneid, ipcarg_t method, ipcarg_t arg1, 58 58 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *result1, ipcarg_t *result2, … … 70 70 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *data); 71 71 72 #define ipc_answer_fast_0(callid, retval) \ 73 ipc_answer_fast((callid), (retval), 0, 0) 74 #define ipc_answer_fast_1(callid, retval, arg1) \ 75 ipc_answer_fast((callid), (retval), (arg1), 0) 72 76 extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, 73 77 ipcarg_t arg1, ipcarg_t arg2); -
uspace/srv/fs/fat/fat.c
r4d21cf8 r20614d0 94 94 * created by IPC_M_CONNECT_TO_ME. 95 95 */ 96 ipc_answer_fast (iid, EOK, 0, 0);96 ipc_answer_fast_0(iid, EOK); 97 97 } 98 98 … … 105 105 switch (IPC_GET_METHOD(call)) { 106 106 default: 107 ipc_answer_fast (callid, ENOTSUP, 0, 0);107 ipc_answer_fast_0(callid, ENOTSUP); 108 108 break; 109 109 } -
uspace/srv/ns/ns.c
r4d21cf8 r20614d0 93 93 ph_addr = (void *) sysinfo_value(name); 94 94 if (!ph_addr) { 95 ipc_answer_fast (callid, ENOENT, 0, 0);95 ipc_answer_fast_0(callid, ENOENT); 96 96 return; 97 97 } 98 98 *addr = as_get_mappable_page(PAGE_SIZE); 99 physmem_map(ph_addr, *addr, 1, AS_AREA_READ | AS_AREA_CACHEABLE); 100 } 101 ipc_answer_fast(callid, 0, (ipcarg_t) *addr, AS_AREA_READ); 99 physmem_map(ph_addr, *addr, 1, 100 AS_AREA_READ | AS_AREA_CACHEABLE); 101 } 102 ipc_answer_fast(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); 102 103 } 103 104 … … 128 129 break; 129 130 default: 130 ipc_answer_fast (callid, ENOENT, 0, 0);131 ipc_answer_fast_0(callid, ENOENT); 131 132 } 132 133 continue; 133 134 case IPC_M_PHONE_HUNGUP: 134 retval = 0;135 retval = EOK; 135 136 break; 136 137 case IPC_M_CONNECT_TO_ME: … … 153 154 } 154 155 if (!(callid & IPC_CALLID_NOTIFICATION)) { 155 ipc_answer_fast (callid, retval, 0, 0);156 ipc_answer_fast_0(callid, retval); 156 157 } 157 158 } -
uspace/srv/vfs/vfs.c
r4d21cf8 r20614d0 60 60 */ 61 61 if (!vfs_conn_open_files_init()) { 62 ipc_answer_fast (iid, ENOMEM, 0, 0);62 ipc_answer_fast_0(iid, ENOMEM); 63 63 return; 64 64 } … … 68 68 * This call needs to be answered. 69 69 */ 70 ipc_answer_fast (iid, EOK, 0, 0);70 ipc_answer_fast_0(iid, EOK); 71 71 72 72 /* … … 105 105 case VFS_SEEK: 106 106 default: 107 ipc_answer_fast (callid, ENOTSUP, 0, 0);107 ipc_answer_fast_0(callid, ENOTSUP); 108 108 break; 109 109 } -
uspace/srv/vfs/vfs_mount.c
r4d21cf8 r20614d0 87 87 size_t size; 88 88 if (!ipc_data_receive(&callid, &call, NULL, &size)) { 89 ipc_answer_fast (callid, EINVAL, 0, 0);90 ipc_answer_fast (rid, EINVAL, 0, 0);89 ipc_answer_fast_0(callid, EINVAL); 90 ipc_answer_fast_0(rid, EINVAL); 91 91 return; 92 92 } … … 99 99 if ((size < FS_NAME_MAXLEN + 1) || 100 100 (size > FS_NAME_MAXLEN + MAX_PATH_LEN)) { 101 ipc_answer_fast (callid, EINVAL, 0, 0);102 ipc_answer_fast (rid, EINVAL, 0, 0);101 ipc_answer_fast_0(callid, EINVAL); 102 ipc_answer_fast_0(rid, EINVAL); 103 103 return; 104 104 } … … 110 110 buf = malloc(size); 111 111 if (!buf) { 112 ipc_answer_fast (callid, ENOMEM, 0, 0);113 ipc_answer_fast (rid, ENOMEM, 0, 0);112 ipc_answer_fast_0(callid, ENOMEM); 113 ipc_answer_fast_0(rid, ENOMEM); 114 114 return; 115 115 } … … 131 131 if (!fs_handle) { 132 132 free(buf); 133 ipc_answer_fast (rid, ENOENT, 0, 0);133 ipc_answer_fast_0(rid, ENOENT); 134 134 return; 135 135 } … … 143 143 if (rc != EOK) { 144 144 free(buf); 145 ipc_answer_fast (rid, rc, 0, 0);145 ipc_answer_fast_0(rid, rc); 146 146 return; 147 147 } … … 164 164 futex_up(&rootfs_futex); 165 165 free(buf); 166 ipc_answer_fast (rid, rc, 0, 0);166 ipc_answer_fast_0(rid, rc); 167 167 return; 168 168 } … … 179 179 futex_up(&rootfs_futex); 180 180 free(buf); 181 ipc_answer_fast (rid, EOK, 0, 0);181 ipc_answer_fast_0(rid, EOK); 182 182 return; 183 183 } else { … … 188 188 futex_up(&rootfs_futex); 189 189 free(buf); 190 ipc_answer_fast (rid, ENOENT, 0, 0);190 ipc_answer_fast_0(rid, ENOENT); 191 191 return; 192 192 } … … 219 219 220 220 if (rc2 == EOK) 221 ipc_answer_fast (rid, rc1, 0, 0);221 ipc_answer_fast_0(rid, rc1); 222 222 else if (rc1 == EOK) 223 ipc_answer_fast (rid, rc2, 0, 0);223 ipc_answer_fast_0(rid, rc2); 224 224 else 225 ipc_answer_fast (rid, rc1, 0, 0);225 ipc_answer_fast_0(rid, rc1); 226 226 } 227 227 -
uspace/srv/vfs/vfs_register.c
r4d21cf8 r20614d0 160 160 */ 161 161 dprintf("Receiving of VFS info failed.\n"); 162 ipc_answer_fast (callid, EINVAL, 0, 0);163 ipc_answer_fast (rid, EINVAL, 0, 0);162 ipc_answer_fast_0(callid, EINVAL); 163 ipc_answer_fast_0(rid, EINVAL); 164 164 return; 165 165 } … … 177 177 */ 178 178 dprintf("Received VFS info has bad size.\n"); 179 ipc_answer_fast (callid, EINVAL, 0, 0);180 ipc_answer_fast (rid, EINVAL, 0, 0);179 ipc_answer_fast_0(callid, EINVAL); 180 ipc_answer_fast_0(rid, EINVAL); 181 181 return; 182 182 } … … 189 189 if (!fs_info) { 190 190 dprintf("Could not allocate memory for FS info.\n"); 191 ipc_answer_fast (callid, ENOMEM, 0, 0);192 ipc_answer_fast (rid, ENOMEM, 0, 0);191 ipc_answer_fast_0(callid, ENOMEM); 192 ipc_answer_fast_0(rid, ENOMEM); 193 193 return; 194 194 } … … 200 200 rc); 201 201 free(fs_info); 202 ipc_answer_fast (callid, rc, 0, 0);203 ipc_answer_fast (rid, rc, 0, 0);202 ipc_answer_fast_0(callid, rc); 203 ipc_answer_fast_0(rid, rc); 204 204 return; 205 205 } … … 209 209 if (!vfs_info_sane(&fs_info->vfs_info)) { 210 210 free(fs_info); 211 ipc_answer_fast (callid, EINVAL, 0, 0);212 ipc_answer_fast (rid, EINVAL, 0, 0);211 ipc_answer_fast_0(callid, EINVAL); 212 ipc_answer_fast_0(rid, EINVAL); 213 213 return; 214 214 } … … 226 226 futex_up(&fs_head_futex); 227 227 free(fs_info); 228 ipc_answer_fast (callid, EEXISTS, 0, 0);229 ipc_answer_fast (rid, EEXISTS, 0, 0);228 ipc_answer_fast_0(callid, EEXISTS); 229 ipc_answer_fast_0(rid, EEXISTS); 230 230 return; 231 231 } … … 248 248 futex_up(&fs_head_futex); 249 249 free(fs_info); 250 ipc_answer_fast (callid, EINVAL, 0, 0);251 ipc_answer_fast (rid, EINVAL, 0, 0);250 ipc_answer_fast_0(callid, EINVAL); 251 ipc_answer_fast_0(rid, EINVAL); 252 252 return; 253 253 } 254 254 fs_info->phone = IPC_GET_ARG3(call); 255 ipc_answer_fast (callid, EOK, 0, 0);255 ipc_answer_fast_0(callid, EOK); 256 256 257 257 dprintf("Callback connection to FS created.\n"); … … 267 267 ipc_hangup(fs_info->phone); 268 268 free(fs_info); 269 ipc_answer_fast (callid, EINVAL, 0, 0);270 ipc_answer_fast (rid, EINVAL, 0, 0);269 ipc_answer_fast_0(callid, EINVAL); 270 ipc_answer_fast_0(rid, EINVAL); 271 271 return; 272 272 } … … 282 282 ipc_hangup(fs_info->phone); 283 283 free(fs_info); 284 ipc_answer_fast (callid, EINVAL, 0, 0);285 ipc_answer_fast (rid, EINVAL, 0, 0);284 ipc_answer_fast_0(callid, EINVAL); 285 ipc_answer_fast_0(rid, EINVAL); 286 286 return; 287 287 } … … 301 301 */ 302 302 fs_info->fs_handle = (int) atomic_postinc(&fs_handle_next); 303 ipc_answer_fast (rid, EOK, (ipcarg_t) fs_info->fs_handle, 0);303 ipc_answer_fast_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); 304 304 305 305 futex_up(&fs_head_futex);
Note:
See TracChangeset
for help on using the changeset viewer.