imagemap_handle_t fb_imagemap_create(async_sess_t *sess, imgmap_t *imgmap) { async_exch_t *exch = async_exchange_begin(sess); ipc_call_t answer; aid_t req = async_send_0(exch, FB_IMAGEMAP_CREATE, &answer); int rc = async_share_out_start(exch, imgmap, AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); async_exchange_end(exch); sysarg_t ret; async_wait_for(req, &ret); if ((rc != EOK) || (ret != EOK)) return 0; return (imagemap_handle_t) IPC_GET_ARG1(answer); }
int ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count, void* buf) { async_exch_t *exch = async_exchange_begin(sess); if (!exch) return EINVAL; aid_t req = async_send_4(exch, DEV_IFACE_ID(AHCI_DEV_IFACE), IPC_M_AHCI_WRITE_BLOCKS, HI(blocknum), LO(blocknum), count, NULL); async_share_out_start(exch, buf, AS_AREA_READ | AS_AREA_WRITE); async_exchange_end(exch); sysarg_t rc; async_wait_for(req, &rc); return rc; }
frontbuf_handle_t fb_frontbuf_create(async_sess_t *sess, screenbuffer_t *frontbuf) { async_exch_t *exch = async_exchange_begin(sess); ipc_call_t answer; aid_t req = async_send_0(exch, FB_FRONTBUF_CREATE, &answer); int rc = async_share_out_start(exch, frontbuf, AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); async_exchange_end(exch); sysarg_t ret; async_wait_for(req, &ret); if ((rc != EOK) || (ret != EOK)) return 0; return (frontbuf_handle_t) IPC_GET_ARG1(answer); }
int win_resize(async_sess_t *sess, sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height, window_placement_flags_t placement_flags, void *cells) { async_exch_t *exch = async_exchange_begin(sess); ipc_call_t answer; aid_t req = async_send_5(exch, WINDOW_RESIZE, x, y, width, height, (sysarg_t) placement_flags, &answer); int rc = async_share_out_start(exch, cells, AS_AREA_READ | AS_AREA_CACHEABLE); async_exchange_end(exch); sysarg_t ret; async_wait_for(req, &ret); if (rc != EOK) return rc; else if (ret != EOK) return ret; return EOK; }