Ignore:
Timestamp:
2018-03-22T06:49:35Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_clock_dev.c

    r3e242d2 ra46e56b  
    6969 */
    7070static void
    71 remote_clock_time_get(ddf_fun_t *fun, void *ops, cap_call_handle_t callid,
     71remote_clock_time_get(ddf_fun_t *fun, void *ops, cap_call_handle_t chandle,
    7272    ipc_call_t *call)
    7373{
    7474        clock_dev_ops_t *clock_dev_ops = (clock_dev_ops_t *) ops;
    75         cap_call_handle_t cid;
     75        cap_call_handle_t call_handle;
    7676        struct tm t;
    7777        errno_t rc;
    7878        size_t len;
    7979
    80         if (!async_data_read_receive(&cid, &len)) {
     80        if (!async_data_read_receive(&call_handle, &len)) {
    8181                /* TODO: Handle protocol error */
    82                 async_answer_0(callid, EINVAL);
     82                async_answer_0(chandle, EINVAL);
    8383                return;
    8484        }
     
    8686        if (!clock_dev_ops->time_get) {
    8787                /* The driver does not provide the time_get() functionality */
    88                 async_answer_0(cid, ENOTSUP);
    89                 async_answer_0(callid, ENOTSUP);
     88                async_answer_0(call_handle, ENOTSUP);
     89                async_answer_0(chandle, ENOTSUP);
    9090                return;
    9191        }
     
    9595        if (rc != EOK) {
    9696                /* Some error occurred */
    97                 async_answer_0(cid, rc);
    98                 async_answer_0(callid, rc);
     97                async_answer_0(call_handle, rc);
     98                async_answer_0(chandle, rc);
    9999                return;
    100100        }
    101101
    102102        /* The operation was successful */
    103         async_data_read_finalize(cid, &t, sizeof(struct tm));
    104         async_answer_0(callid, rc);
     103        async_data_read_finalize(call_handle, &t, sizeof(struct tm));
     104        async_answer_0(chandle, rc);
    105105}
    106106
     
    111111 */
    112112static void remote_clock_time_set(ddf_fun_t *fun, void *ops,
    113     cap_call_handle_t callid, ipc_call_t *call)
     113    cap_call_handle_t chandle, ipc_call_t *call)
    114114{
    115115        clock_dev_ops_t *clock_dev_ops = (clock_dev_ops_t *) ops;
    116116        errno_t      rc;
    117117        struct tm    t;
    118         cap_call_handle_t cid;
     118        cap_call_handle_t call_handle;
    119119        size_t       len;
    120120
    121         if (!async_data_write_receive(&cid, &len)) {
     121        if (!async_data_write_receive(&call_handle, &len)) {
    122122                /* TODO: Handle protocol error */
    123                 async_answer_0(callid, EINVAL);
     123                async_answer_0(chandle, EINVAL);
    124124                return;
    125125        }
     
    127127        if (!clock_dev_ops->time_set) {
    128128                /* The driver does not support the time_set() functionality */
    129                 async_answer_0(cid, ENOTSUP);
    130                 async_answer_0(callid, ENOTSUP);
     129                async_answer_0(call_handle, ENOTSUP);
     130                async_answer_0(chandle, ENOTSUP);
    131131                return;
    132132        }
    133133
    134         async_data_write_finalize(cid, &t, sizeof(struct tm));
     134        async_data_write_finalize(call_handle, &t, sizeof(struct tm));
    135135
    136136        rc = (*clock_dev_ops->time_set)(fun, &t);
    137137
    138         async_answer_0(callid, rc);
     138        async_answer_0(chandle, rc);
    139139}
    140140
Note: See TracChangeset for help on using the changeset viewer.