Changeset a46e56b in mainline for uspace/drv/intctl


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 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

Location:
uspace/drv/intctl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/intctl/apic/apic.c

    r3e242d2 ra46e56b  
    164164 * @param arg   Local argument.
    165165 */
    166 static void apic_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
    167 {
    168         cap_call_handle_t callid;
     166static void apic_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     167{
     168        cap_call_handle_t chandle;
    169169        ipc_call_t call;
    170170        apic_t *apic;
     
    173173         * Answer the first IPC_M_CONNECT_ME_TO call.
    174174         */
    175         async_answer_0(iid, EOK);
     175        async_answer_0(icall_handle, EOK);
    176176
    177177        apic = (apic_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));
    178178
    179179        while (true) {
    180                 callid = async_get_call(&call);
     180                chandle = async_get_call(&call);
    181181
    182182                if (!IPC_GET_IMETHOD(call)) {
    183183                        /* The other side has hung up. */
    184                         async_answer_0(callid, EOK);
     184                        async_answer_0(chandle, EOK);
    185185                        return;
    186186                }
     
    188188                switch (IPC_GET_IMETHOD(call)) {
    189189                case IRC_ENABLE_INTERRUPT:
    190                         async_answer_0(callid, apic_enable_irq(apic,
     190                        async_answer_0(chandle, apic_enable_irq(apic,
    191191                            IPC_GET_ARG1(call)));
    192192                        break;
    193193                case IRC_DISABLE_INTERRUPT:
    194194                        /* XXX TODO */
    195                         async_answer_0(callid, EOK);
     195                        async_answer_0(chandle, EOK);
    196196                        break;
    197197                case IRC_CLEAR_INTERRUPT:
    198198                        /* Noop */
    199                         async_answer_0(callid, EOK);
     199                        async_answer_0(chandle, EOK);
    200200                        break;
    201201                default:
    202                         async_answer_0(callid, EINVAL);
     202                        async_answer_0(chandle, EINVAL);
    203203                        break;
    204204                }
  • uspace/drv/intctl/i8259/i8259.c

    r3e242d2 ra46e56b  
    9393 * @param arg   Local argument.
    9494 */
    95 static void i8259_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
    96 {
    97         cap_call_handle_t callid;
     95static void i8259_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     96{
     97        cap_call_handle_t chandle;
    9898        ipc_call_t call;
    9999        i8259_t *i8259 = NULL /* XXX */;
     
    102102         * Answer the first IPC_M_CONNECT_ME_TO call.
    103103         */
    104         async_answer_0(iid, EOK);
     104        async_answer_0(icall_handle, EOK);
    105105
    106106        i8259 = (i8259_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));
    107107
    108108        while (true) {
    109                 callid = async_get_call(&call);
     109                chandle = async_get_call(&call);
    110110
    111111                if (!IPC_GET_IMETHOD(call)) {
    112112                        /* The other side has hung up. */
    113                         async_answer_0(callid, EOK);
     113                        async_answer_0(chandle, EOK);
    114114                        return;
    115115                }
     
    117117                switch (IPC_GET_IMETHOD(call)) {
    118118                case IRC_ENABLE_INTERRUPT:
    119                         async_answer_0(callid, pic_enable_irq(i8259,
     119                        async_answer_0(chandle, pic_enable_irq(i8259,
    120120                            IPC_GET_ARG1(call)));
    121121                        break;
    122122                case IRC_DISABLE_INTERRUPT:
    123123                        /* XXX TODO */
    124                         async_answer_0(callid, EOK);
     124                        async_answer_0(chandle, EOK);
    125125                        break;
    126126                case IRC_CLEAR_INTERRUPT:
    127127                        /* Noop */
    128                         async_answer_0(callid, EOK);
     128                        async_answer_0(chandle, EOK);
    129129                        break;
    130130                default:
    131                         async_answer_0(callid, EINVAL);
     131                        async_answer_0(chandle, EINVAL);
    132132                        break;
    133133                }
  • uspace/drv/intctl/icp-ic/icp-ic.c

    r3e242d2 ra46e56b  
    6969 * @param arg   Local argument.
    7070 */
    71 static void icpic_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     71static void icpic_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    7272{
    73         cap_call_handle_t callid;
     73        cap_call_handle_t chandle;
    7474        ipc_call_t call;
    7575        icpic_t *icpic;
     
    7878         * Answer the first IPC_M_CONNECT_ME_TO call.
    7979         */
    80         async_answer_0(iid, EOK);
     80        async_answer_0(icall_handle, EOK);
    8181
    8282        icpic = (icpic_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));
    8383
    8484        while (true) {
    85                 callid = async_get_call(&call);
     85                chandle = async_get_call(&call);
    8686
    8787                if (!IPC_GET_IMETHOD(call)) {
    8888                        /* The other side has hung up. */
    89                         async_answer_0(callid, EOK);
     89                        async_answer_0(chandle, EOK);
    9090                        return;
    9191                }
     
    9393                switch (IPC_GET_IMETHOD(call)) {
    9494                case IRC_ENABLE_INTERRUPT:
    95                         async_answer_0(callid,
     95                        async_answer_0(chandle,
    9696                            icpic_enable_irq(icpic, IPC_GET_ARG1(call)));
    9797                        break;
    9898                case IRC_DISABLE_INTERRUPT:
    9999                        /* XXX TODO */
    100                         async_answer_0(callid, EOK);
     100                        async_answer_0(chandle, EOK);
    101101                        break;
    102102                case IRC_CLEAR_INTERRUPT:
    103103                        /* Noop */
    104                         async_answer_0(callid, EOK);
     104                        async_answer_0(chandle, EOK);
    105105                        break;
    106106                default:
    107                         async_answer_0(callid, EINVAL);
     107                        async_answer_0(chandle, EINVAL);
    108108                        break;
    109109                }
  • uspace/drv/intctl/obio/obio.c

    r3e242d2 ra46e56b  
    7373 * @param arg           Local argument.
    7474 */
    75 static void obio_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     75static void obio_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    7676{
    77         cap_call_handle_t callid;
     77        cap_call_handle_t chandle;
    7878        ipc_call_t call;
    7979        obio_t *obio;
     
    8282         * Answer the first IPC_M_CONNECT_ME_TO call.
    8383         */
    84         async_answer_0(iid, EOK);
     84        async_answer_0(icall_handle, EOK);
    8585
    8686        obio = (obio_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));
     
    8989                int inr;
    9090
    91                 callid = async_get_call(&call);
     91                chandle = async_get_call(&call);
    9292                switch (IPC_GET_IMETHOD(call)) {
    9393                case IRC_ENABLE_INTERRUPT:
     
    9595                        pio_set_64(&obio->regs[OBIO_IMR(inr & INO_MASK)],
    9696                            1UL << 31, 0);
    97                         async_answer_0(callid, EOK);
     97                        async_answer_0(chandle, EOK);
    9898                        break;
    9999                case IRC_DISABLE_INTERRUPT:
    100100                        /* XXX TODO */
    101                         async_answer_0(callid, EOK);
     101                        async_answer_0(chandle, EOK);
    102102                        break;
    103103                case IRC_CLEAR_INTERRUPT:
    104104                        inr = IPC_GET_ARG1(call);
    105105                        pio_write_64(&obio->regs[OBIO_CIR(inr & INO_MASK)], 0);
    106                         async_answer_0(callid, EOK);
     106                        async_answer_0(chandle, EOK);
    107107                        break;
    108108                default:
    109                         async_answer_0(callid, EINVAL);
     109                        async_answer_0(chandle, EINVAL);
    110110                        break;
    111111                }
Note: See TracChangeset for help on using the changeset viewer.