Changeset 27d293a in mainline for uspace/srv


Ignore:
Timestamp:
2007-12-31T16:46:43Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
215e375
Parents:
3115355
Message:

Rename IPC_M_AS_AREA_SEND to IPC_M_SHARE_OUT. Rename IPC_M_AS_AREA_RECV to
IPC_M_SHARE_IN. Provide user-friendly wrappers for these methods so that even
dummies can get it right. Some applications using simpler protocols still use
these methods directly.

Location:
uspace/srv
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/console.c

    r3115355 r27d293a  
    538538            PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
    539539        if (!interbuffer) {
    540                 if (async_req_3_0(fb_info.phone, IPC_M_AS_AREA_SEND,
    541                     (ipcarg_t) interbuffer, 0, AS_AREA_READ) != 0) {
     540                if (ipc_share_out_send(fb_info.phone, interbuffer,
     541                    AS_AREA_READ) != EOK) {
    542542                        munmap(interbuffer,
    543543                            sizeof(keyfield_t) * fb_info.cols * fb_info.rows);
  • uspace/srv/console/gcons.c

    r3115355 r27d293a  
    326326        if (rc)
    327327                goto exit;
    328         rc = async_req_3_0(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t) shm, 0,
    329             PROTO_READ);
     328        rc = ipc_share_out_send(fbphone, shm, PROTO_READ);
    330329        if (rc)
    331330                goto drop;
     
    388387        if (rc)
    389388                goto exit;
    390         rc = async_req_3_0(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t) shm, 0,
    391             PROTO_READ);
     389        rc = ipc_share_out_send(fbphone, shm, PROTO_READ);
    392390        if (rc)
    393391                goto drop;
  • uspace/srv/fb/ega.c

    r3115355 r27d293a  
    209209                        ipc_answer_0(callid, EOK);
    210210                        return; /* Exit thread */
    211                 case IPC_M_AS_AREA_SEND:
     211                case IPC_M_SHARE_OUT:
    212212                        /* We accept one area for data interchange */
    213213                        intersize = IPC_GET_ARG2(call);
  • uspace/srv/fb/fb.c

    r3115355 r27d293a  
    748748
    749749        switch (IPC_GET_METHOD(*call)) {
    750         case IPC_M_AS_AREA_SEND:
     750        case IPC_M_SHARE_OUT:
    751751                /* We accept one area for data interchange */
    752752                if (IPC_GET_ARG1(*call) == shm_id) {
  • uspace/srv/ns/ns.c

    r3115355 r27d293a  
    118118                callid = ipc_wait_for_call(&call);
    119119                switch (IPC_GET_METHOD(call)) {
    120                 case IPC_M_AS_AREA_RECV:
     120                case IPC_M_SHARE_IN:
    121121                        switch (IPC_GET_ARG3(call)) {
    122122                        case SERVICE_MEM_REALTIME:
  • uspace/srv/rd/rd.c

    r3115355 r27d293a  
    104104         * Now we wait for the client to send us its communication as_area.
    105105         */
    106         callid = async_get_call(&call);
    107         if (IPC_GET_METHOD(call) == IPC_M_AS_AREA_SEND) {
    108                 if (IPC_GET_ARG1(call) >= (ipcarg_t) BLOCK_SIZE) {
     106        size_t size;
     107        if (ipc_share_out_receive(&callid, &size, NULL)) {
     108                if (size >= BLOCK_SIZE) {
    109109                        /*
    110110                         * The client sends an as_area that can absorb the whole
    111111                         * block.
    112112                         */
    113                         ipc_answer_1(callid, EOK, (uintptr_t) fs_va);
     113                        (void) ipc_share_out_deliver(callid, fs_va);
    114114                } else {
    115115                        /*
  • uspace/srv/vfs/vfs_register.c

    r3115355 r27d293a  
    271271         * The client will want us to send him the address space area with PLB.
    272272         */
    273         callid = async_get_call(&call);
    274         if (IPC_GET_METHOD(call) != IPC_M_AS_AREA_RECV) {
     273
     274        if (!ipc_share_in_receive(&callid, &size)) {
    275275                dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
    276276                list_remove(&fs_info->fs_link);
     
    286286         * We can only send the client address space area PLB_SIZE bytes long.
    287287         */
    288         size = IPC_GET_ARG2(call);
    289288        if (size != PLB_SIZE) {
    290289                dprintf("Client suggests wrong size of PFB, size = %d\n", size);
     
    301300         * Commit to read-only sharing the PLB with the client.
    302301         */
    303         ipc_answer_2(callid, EOK, (ipcarg_t) plb,
    304             (ipcarg_t) (AS_AREA_READ | AS_AREA_CACHEABLE));     
     302        (void) ipc_share_in_deliver(callid, plb,
     303            AS_AREA_READ | AS_AREA_CACHEABLE);
    305304
    306305        dprintf("Sharing PLB.\n");
Note: See TracChangeset for help on using the changeset viewer.