Changeset 215e375 in mainline
- Timestamp:
- 2007-12-31T17:23:20Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f57f8ea
- Parents:
- 27d293a
- Location:
- uspace
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/klog/klog.c
r27d293a r215e375 64 64 65 65 mapping = as_get_mappable_page(PAGE_SIZE); 66 res = ipc_share_in_s end_1_0(PHONE_NS, mapping, PAGE_SIZE,66 res = ipc_share_in_start_1_0(PHONE_NS, mapping, PAGE_SIZE, 67 67 SERVICE_MEM_KLOG); 68 68 if (res) { -
uspace/app/tester/devmap/devmap1.c
r27d293a r215e375 143 143 req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); 144 144 145 retval = ipc_data_write_s end(phone, (char *)name, strlen(name) + 1);145 retval = ipc_data_write_start(phone, (char *)name, strlen(name) + 1); 146 146 147 147 if (retval != EOK) { … … 176 176 &answer); 177 177 178 retval = ipc_data_write_s end(driver_phone, name, strlen(name) + 1);178 retval = ipc_data_write_start(driver_phone, name, strlen(name) + 1); 179 179 180 180 if (retval != EOK) { … … 217 217 req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); 218 218 219 retval = ipc_data_write_s end(driver_phone, (char *)name,219 retval = ipc_data_write_start(driver_phone, (char *)name, 220 220 strlen(name) + 1); 221 221 -
uspace/lib/libc/generic/ipc.c
r27d293a r215e375 678 678 * @return Zero on success or a negative error code from errno.h. 679 679 */ 680 int ipc_share_in_s end(int phoneid, void *dst, size_t size, ipcarg_t arg,680 int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg, 681 681 int *flags) 682 682 { … … 728 728 * @return Zero on success or a value from @ref errno.h on failure. 729 729 */ 730 int ipc_share_in_ deliver(ipc_callid_t callid, void *src, int flags)730 int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags) 731 731 { 732 732 return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) flags); … … 741 741 * @return Zero on success or a negative error code from errno.h. 742 742 */ 743 int ipc_share_out_s end(int phoneid, void *src, int flags)743 int ipc_share_out_start(int phoneid, void *src, int flags) 744 744 { 745 745 return ipc_call_sync_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0, … … 788 788 * @return Zero on success or a value from @ref errno.h on failure. 789 789 */ 790 int ipc_share_out_ deliver(ipc_callid_t callid, void *dst)790 int ipc_share_out_finalize(ipc_callid_t callid, void *dst) 791 791 { 792 792 return ipc_answer_1(callid, EOK, (ipcarg_t) dst); … … 802 802 * @return Zero on success or a negative error code from errno.h. 803 803 */ 804 int ipc_data_read_s end(int phoneid, void *dst, size_t size)804 int ipc_data_read_start(int phoneid, void *dst, size_t size) 805 805 { 806 806 return ipc_call_sync_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst, … … 848 848 * @return Zero on success or a value from @ref errno.h on failure. 849 849 */ 850 int ipc_data_read_ deliver(ipc_callid_t callid, void *src, size_t size)850 int ipc_data_read_finalize(ipc_callid_t callid, void *src, size_t size) 851 851 { 852 852 return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) size); … … 861 861 * @return Zero on success or a negative error code from errno.h. 862 862 */ 863 int ipc_data_write_s end(int phoneid, void *src, size_t size)863 int ipc_data_write_start(int phoneid, void *src, size_t size) 864 864 { 865 865 return ipc_call_sync_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src, … … 906 906 * @return Zero on success or a value from @ref errno.h on failure. 907 907 */ 908 int ipc_data_write_ deliver(ipc_callid_t callid, void *dst, size_t size)908 int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size) 909 909 { 910 910 return ipc_answer_2(callid, EOK, (ipcarg_t) dst, (ipcarg_t) size); -
uspace/lib/libc/generic/time.c
r27d293a r215e375 142 142 mapping = as_get_mappable_page(PAGE_SIZE); 143 143 /* Get the mapping of kernel clock */ 144 res = ipc_share_in_s end_1_1(PHONE_NS, mapping, PAGE_SIZE,144 res = ipc_share_in_start_1_1(PHONE_NS, mapping, PAGE_SIZE, 145 145 SERVICE_MEM_REALTIME, &rights); 146 146 if (res) { -
uspace/lib/libc/generic/vfs.c
r27d293a r215e375 74 74 } 75 75 req = async_send_1(vfs_phone, VFS_MOUNT, dev_handle, NULL); 76 rc = ipc_data_write_s end(vfs_phone, (void *)fs_name, strlen(fs_name));76 rc = ipc_data_write_start(vfs_phone, (void *)fs_name, strlen(fs_name)); 77 77 if (rc != EOK) { 78 78 async_wait_for(req, NULL); … … 81 81 return (int) rc; 82 82 } 83 rc = ipc_data_write_s end(vfs_phone, (void *)mp, strlen(mp));83 rc = ipc_data_write_start(vfs_phone, (void *)mp, strlen(mp)); 84 84 if (rc != EOK) { 85 85 async_wait_for(req, NULL); … … 113 113 } 114 114 req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer); 115 rc = ipc_data_write_s end(vfs_phone, name, strlen(name));115 rc = ipc_data_write_start(vfs_phone, name, strlen(name)); 116 116 if (rc != EOK) { 117 117 async_wait_for(req, NULL); … … 144 144 } 145 145 req = async_send_1(vfs_phone, VFS_READ, fildes, &answer); 146 if (ipc_data_read_s end(vfs_phone, (void *)buf, nbyte) != EOK) {146 if (ipc_data_read_start(vfs_phone, (void *)buf, nbyte) != EOK) { 147 147 async_wait_for(req, NULL); 148 148 async_serialize_end(); … … 174 174 } 175 175 req = async_send_1(vfs_phone, VFS_WRITE, fildes, &answer); 176 if (ipc_data_write_s end(vfs_phone, (void *)buf, nbyte) != EOK) {176 if (ipc_data_write_start(vfs_phone, (void *)buf, nbyte) != EOK) { 177 177 async_wait_for(req, NULL); 178 178 async_serialize_end(); -
uspace/lib/libc/include/ipc/ipc.h
r27d293a r215e375 264 264 265 265 /* 266 * User-friendly wrappers for ipc_share_in_s end().267 */ 268 #define ipc_share_in_s end_0_0(phoneid, dst, size) \269 ipc_share_in_s end((phoneid), (dst), (size), 0, NULL)270 #define ipc_share_in_s end_0_1(phoneid, dst, size, flags) \271 ipc_share_in_s end((phoneid), (dst), (size), 0, (flags))272 #define ipc_share_in_s end_1_0(phoneid, dst, size, arg) \273 ipc_share_in_s end((phoneid), (dst), (size), (arg), NULL)274 #define ipc_share_in_s end_1_1(phoneid, dst, size, arg, flags) \275 ipc_share_in_s end((phoneid), (dst), (size), (arg), (flags))276 277 extern int ipc_share_in_s end(int phoneid, void *dst, size_t size, ipcarg_t arg,266 * User-friendly wrappers for ipc_share_in_start(). 267 */ 268 #define ipc_share_in_start_0_0(phoneid, dst, size) \ 269 ipc_share_in_start((phoneid), (dst), (size), 0, NULL) 270 #define ipc_share_in_start_0_1(phoneid, dst, size, flags) \ 271 ipc_share_in_start((phoneid), (dst), (size), 0, (flags)) 272 #define ipc_share_in_start_1_0(phoneid, dst, size, arg) \ 273 ipc_share_in_start((phoneid), (dst), (size), (arg), NULL) 274 #define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \ 275 ipc_share_in_start((phoneid), (dst), (size), (arg), (flags)) 276 277 extern int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg, 278 278 int *flags); 279 279 extern int ipc_share_in_receive(ipc_callid_t *callid, size_t *size); 280 extern int ipc_share_in_ deliver(ipc_callid_t callid, void *src, int flags);281 extern int ipc_share_out_s end(int phoneid, void *src, int flags);280 extern int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags); 281 extern int ipc_share_out_start(int phoneid, void *src, int flags); 282 282 extern int ipc_share_out_receive(ipc_callid_t *callid, size_t *size, int *flags); 283 extern int ipc_share_out_ deliver(ipc_callid_t callid, void *dst);284 extern int ipc_data_read_s end(int phoneid, void *dst, size_t size);283 extern int ipc_share_out_finalize(ipc_callid_t callid, void *dst); 284 extern int ipc_data_read_start(int phoneid, void *dst, size_t size); 285 285 extern int ipc_data_read_receive(ipc_callid_t *callid, size_t *size); 286 extern int ipc_data_read_ deliver(ipc_callid_t callid, void *src, size_t size);287 extern int ipc_data_write_s end(int phoneid, void *src, size_t size);286 extern int ipc_data_read_finalize(ipc_callid_t callid, void *src, size_t size); 287 extern int ipc_data_write_start(int phoneid, void *src, size_t size); 288 288 extern int ipc_data_write_receive(ipc_callid_t *callid, size_t *size); 289 extern int ipc_data_write_ deliver(ipc_callid_t callid, void *dst, size_t size);289 extern int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size); 290 290 291 291 #endif -
uspace/lib/libfs/libfs.c
r27d293a r215e375 72 72 * Send our VFS info structure to VFS. 73 73 */ 74 int rc = ipc_data_write_s end(vfs_phone, info, sizeof(*info));74 int rc = ipc_data_write_start(vfs_phone, info, sizeof(*info)); 75 75 if (rc != EOK) { 76 76 async_wait_for(req, NULL); … … 95 95 * Request sharing the Path Lookup Buffer with VFS. 96 96 */ 97 rc = ipc_share_in_s end_0_0(vfs_phone, reg->plb_ro, PLB_SIZE);97 rc = ipc_share_in_start_0_0(vfs_phone, reg->plb_ro, PLB_SIZE); 98 98 if (rc) { 99 99 async_wait_for(req, NULL); -
uspace/srv/console/console.c
r27d293a r215e375 538 538 PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); 539 539 if (!interbuffer) { 540 if (ipc_share_out_s end(fb_info.phone, interbuffer,540 if (ipc_share_out_start(fb_info.phone, interbuffer, 541 541 AS_AREA_READ) != EOK) { 542 542 munmap(interbuffer, -
uspace/srv/console/gcons.c
r27d293a r215e375 326 326 if (rc) 327 327 goto exit; 328 rc = ipc_share_out_s end(fbphone, shm, PROTO_READ);328 rc = ipc_share_out_start(fbphone, shm, PROTO_READ); 329 329 if (rc) 330 330 goto drop; … … 387 387 if (rc) 388 388 goto exit; 389 rc = ipc_share_out_s end(fbphone, shm, PROTO_READ);389 rc = ipc_share_out_start(fbphone, shm, PROTO_READ); 390 390 if (rc) 391 391 goto drop; -
uspace/srv/devmap/devmap.c
r27d293a r215e375 234 234 * Send confirmation to sender and get data into buffer. 235 235 */ 236 if (EOK != ipc_data_write_ deliver(callid, driver->name, name_size)) {236 if (EOK != ipc_data_write_finalize(callid, driver->name, name_size)) { 237 237 printf("Cannot read driver name.\n"); 238 238 free(driver->name); … … 395 395 } 396 396 397 ipc_data_write_ deliver(callid, device->name, size);397 ipc_data_write_finalize(callid, device->name, size); 398 398 device->name[size] = 0; 399 399 … … 514 514 * Send confirmation to sender and get data into buffer. 515 515 */ 516 if (EOK != (retval = ipc_data_write_deliver(callid, name, name_size))) { 516 if (EOK != (retval = ipc_data_write_finalize(callid, name, 517 name_size))) { 517 518 ipc_answer_0(iid, EREFUSED); 518 519 return; -
uspace/srv/fs/tmpfs/tmpfs_ops.c
r27d293a r215e375 308 308 309 309 size_t bytes = max(0, min(dentry->size - pos, len)); 310 (void) ipc_data_read_ deliver(callid, dentry->data + pos, bytes);310 (void) ipc_data_read_finalize(callid, dentry->data + pos, bytes); 311 311 312 312 /* … … 350 350 if (pos + len <= dentry->size) { 351 351 /* The file size is not changing. */ 352 (void) ipc_data_write_ deliver(callid, dentry->data + pos, len);352 (void) ipc_data_write_finalize(callid, dentry->data + pos, len); 353 353 ipc_answer_1(rid, EOK, len); 354 354 return; … … 370 370 dentry->size += delta; 371 371 dentry->data = newdata; 372 (void) ipc_data_write_ deliver(callid, dentry->data + pos, len);372 (void) ipc_data_write_finalize(callid, dentry->data + pos, len); 373 373 ipc_answer_1(rid, EOK, len); 374 374 } -
uspace/srv/rd/rd.c
r27d293a r215e375 111 111 * block. 112 112 */ 113 (void) ipc_share_out_ deliver(callid, fs_va);113 (void) ipc_share_out_finalize(callid, fs_va); 114 114 } else { 115 115 /* -
uspace/srv/vfs/vfs_mount.c
r27d293a r215e375 107 107 */ 108 108 char fs_name[FS_NAME_MAXLEN + 1]; 109 (void) ipc_data_write_ deliver(callid, fs_name, size);109 (void) ipc_data_write_finalize(callid, fs_name, size); 110 110 fs_name[size] = '\0'; 111 111 … … 151 151 * Deliver the mount point. 152 152 */ 153 (void) ipc_data_write_ deliver(callid, buf, size);153 (void) ipc_data_write_finalize(callid, buf, size); 154 154 155 155 /* -
uspace/srv/vfs/vfs_open.c
r27d293a r215e375 83 83 84 84 int rc; 85 if ((rc = ipc_data_write_ deliver(callid, path, size))) {85 if ((rc = ipc_data_write_finalize(callid, path, size))) { 86 86 ipc_answer_0(rid, rc); 87 87 free(path); -
uspace/srv/vfs/vfs_register.c
r27d293a r215e375 206 206 futex_initialize(&fs_info->phone_futex, 1); 207 207 208 rc = ipc_data_write_ deliver(callid, &fs_info->vfs_info, size);208 rc = ipc_data_write_finalize(callid, &fs_info->vfs_info, size); 209 209 if (rc != EOK) { 210 210 dprintf("Failed to deliver the VFS info into our AS, rc=%d.\n", … … 300 300 * Commit to read-only sharing the PLB with the client. 301 301 */ 302 (void) ipc_share_in_ deliver(callid, plb,302 (void) ipc_share_in_finalize(callid, plb, 303 303 AS_AREA_READ | AS_AREA_CACHEABLE); 304 304
Note:
See TracChangeset
for help on using the changeset viewer.