Changeset 46b881c in mainline for uspace/srv/bd/rd/rd.c


Ignore:
Timestamp:
2011-01-29T11:36:41Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b6931a, 8add9ca5
Parents:
e26a4633 (diff), ffa2c8ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

IPC/async: strictly isolate the use of low-level IPC methods (ipc_*) and async framework methods (async_*) in user code, do not allow a mixture of both in a single source file

Benefits for future plans

  • The async framework could use different communication style under the hood, but keeping the same high-level API
  • The async framework can be integrated more tightly with sessions without potential problems of intermixing session-aware async methods with session-unaware low-level methods in user code
  • The async_serialize_start()/_end() can be deprecated more easily
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/rd/rd.c

    re26a4633 r46b881c  
    3939 */
    4040
    41 #include <ipc/ipc.h>
    4241#include <ipc/services.h>
    4342#include <ipc/ns.h>
     
    9897         * Answer the first IPC_M_CONNECT_ME_TO call.
    9998         */
    100         ipc_answer_0(iid, EOK);
     99        async_answer_0(iid, EOK);
    101100       
    102101        /*
     
    109108                        (void) async_share_out_finalize(callid, fs_va);
    110109                } else {
    111                         ipc_answer_0(callid, EHANGUP);
     110                        async_answer_0(callid, EHANGUP);
    112111                        return;
    113112                }
     
    118117                 * Close the connection.
    119118                 */
    120                 ipc_answer_0(callid, EHANGUP);
     119                async_answer_0(callid, EHANGUP);
    121120                return;
    122121        }
     
    130129                         * Answer the message and exit the fibril.
    131130                         */
    132                         ipc_answer_0(callid, EOK);
     131                        async_answer_0(callid, EOK);
    133132                        return;
    134133                case BD_READ_BLOCKS:
     
    153152                        break;
    154153                case BD_GET_BLOCK_SIZE:
    155                         ipc_answer_1(callid, EOK, block_size);
     154                        async_answer_1(callid, EOK, block_size);
    156155                        continue;
    157156                case BD_GET_NUM_BLOCKS:
    158                         ipc_answer_2(callid, EOK, LOWER32(rd_size / block_size),
     157                        async_answer_2(callid, EOK, LOWER32(rd_size / block_size),
    159158                            UPPER32(rd_size / block_size));
    160159                        continue;
     
    169168                        break;
    170169                }
    171                 ipc_answer_0(callid, retval);
     170                async_answer_0(callid, retval);
    172171        }
    173172}
Note: See TracChangeset for help on using the changeset viewer.