Changeset a35b458 in mainline for uspace/lib/c/generic/ipc.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ipc.c

    r3061bc1 ra35b458  
    5656        ipc_async_callback_t callback;
    5757        void *private;
    58        
     58
    5959        struct {
    6060                ipc_call_t data;
     
    7878                if (callback)
    7979                        callback(private, ENOMEM, NULL);
    80                
     80
    8181                return NULL;
    8282        }
    83        
     83
    8484        call->callback = callback;
    8585        call->private = private;
    86        
     86
    8787        return call;
    8888}
     
    9999                return;
    100100        }
    101        
     101
    102102        if (rc != EOK) {
    103103                /* Call asynchronous handler with error code */
    104104                if (call->callback)
    105105                        call->callback(call->private, ENOENT, NULL);
    106                
     106
    107107                free(call);
    108108                return;
     
    135135        if (!call)
    136136                return;
    137        
     137
    138138        errno_t rc = (errno_t) __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phandle, imethod, arg1,
    139139            arg2, arg3, (sysarg_t) call);
    140        
     140
    141141        ipc_finish_async(rc, call);
    142142}
     
    167167        if (!call)
    168168                return;
    169        
     169
    170170        IPC_SET_IMETHOD(call->msg.data, imethod);
    171171        IPC_SET_ARG1(call->msg.data, arg1);
     
    174174        IPC_SET_ARG4(call->msg.data, arg4);
    175175        IPC_SET_ARG5(call->msg.data, arg5);
    176        
     176
    177177        errno_t rc = (errno_t) __SYSCALL3(SYS_IPC_CALL_ASYNC_SLOW, phandle,
    178178            (sysarg_t) &call->msg.data, (sysarg_t) call);
    179        
     179
    180180        ipc_finish_async(rc, call);
    181181}
     
    222222{
    223223        ipc_call_t data;
    224        
     224
    225225        IPC_SET_RETVAL(data, retval);
    226226        IPC_SET_ARG1(data, arg1);
     
    229229        IPC_SET_ARG4(data, arg4);
    230230        IPC_SET_ARG5(data, arg5);
    231        
     231
    232232        return (errno_t) __SYSCALL2(SYS_IPC_ANSWER_SLOW, chandle, (sysarg_t) &data);
    233233}
     
    261261{
    262262        errno_t rc = (errno_t) __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, flags);
    263        
     263
    264264        /* Handle received answers */
    265265        if ((rc == EOK) && (call->cap_handle == CAP_NIL) &&
     
    267267                handle_answer(call);
    268268        }
    269        
     269
    270270        return rc;
    271271}
     
    292292{
    293293        errno_t rc;
    294        
     294
    295295        do {
    296296                rc = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
    297297        } while ((rc == EOK) && (call->cap_handle == CAP_NIL) && (call->flags & IPC_CALL_ANSWERED));
    298        
     298
    299299        return rc;
    300300}
     
    312312{
    313313        errno_t rc;
    314        
     314
    315315        do {
    316316                rc = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT,
    317317                    SYNCH_FLAGS_NON_BLOCKING);
    318318        } while ((rc == EOK) && (call->cap_handle == CAP_NIL) && (call->flags & IPC_CALL_ANSWERED));
    319        
     319
    320320        return rc;
    321321}
     
    362362{
    363363        ipc_call_t data;
    364        
     364
    365365        IPC_SET_IMETHOD(data, imethod);
    366366        IPC_SET_ARG1(data, arg1);
     
    369369        IPC_SET_ARG4(data, arg4);
    370370        IPC_SET_ARG5(data, arg5);
    371        
     371
    372372        return (errno_t) __SYSCALL4(SYS_IPC_FORWARD_SLOW, chandle, phandle,
    373373            (sysarg_t) &data, mode);
Note: See TracChangeset for help on using the changeset viewer.