Changeset 1433ecda in mainline for uspace/lib/c


Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
uspace/lib/c
Files:
57 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/abs32le/include/libarch/elf_linux.h

    r47b2d7e3 r1433ecda  
    4343static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
    4444{
    45         (void) istate; (void) elf_regs;
     45        (void) istate;
     46        (void) elf_regs;
    4647}
    4748
  • uspace/lib/c/arch/abs32le/src/entryjmp.c

    r47b2d7e3 r1433ecda  
    3636void entry_point_jmp(void *entry_point, void *pcb)
    3737{
    38         while (true);
     38        while (true)
     39                ;
    3940}
    4041
  • uspace/lib/c/arch/abs32le/src/fibril.c

    r47b2d7e3 r1433ecda  
    4040void __longjmp(context_t *ctx, int val)
    4141{
    42         while (true);
     42        while (true)
     43                ;
    4344}
    4445
  • uspace/lib/c/arch/abs32le/src/tls.c

    r47b2d7e3 r1433ecda  
    3434#include <stdint.h>
    3535
    36 tcb_t * tls_alloc_arch(void **data, size_t size)
     36tcb_t *tls_alloc_arch(void **data, size_t size)
    3737{
    3838        return tls_alloc_variant_2(data, size);
  • uspace/lib/c/arch/amd64/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    4646#ifdef __PCC__
    4747        asm volatile (
    48                 "lock incq %0\n"
    49                 : "+m" (val->count)
     48            "lock incq %0\n"
     49            : "+m" (val->count)
    5050        );
    5151#else
    5252        asm volatile (
    53                 "lock incq %[count]\n"
    54                 : [count] "+m" (val->count)
     53            "lock incq %[count]\n"
     54            : [count] "+m" (val->count)
    5555        );
    5656#endif
     
    6161#ifdef __PCC__
    6262        asm volatile (
    63                 "lock decq %0\n"
    64                 : "+m" (val->count)
     63            "lock decq %0\n"
     64            : "+m" (val->count)
    6565        );
    6666#else
    6767        asm volatile (
    68                 "lock decq %[count]\n"
    69                 : [count] "+m" (val->count)
     68            "lock decq %[count]\n"
     69            : [count] "+m" (val->count)
    7070        );
    7171#endif
     
    7878#ifdef __PCC__
    7979        asm volatile (
    80                 "lock xaddq %1, %0\n"
    81                 : "+m" (val->count),
    82                   "+r" (r)
     80            "lock xaddq %1, %0\n"
     81            : "+m" (val->count),
     82              "+r" (r)
    8383        );
    8484#else
    8585        asm volatile (
    86                 "lock xaddq %[r], %[count]\n"
    87                 : [count] "+m" (val->count),
    88                   [r] "+r" (r)
     86            "lock xaddq %[r], %[count]\n"
     87            : [count] "+m" (val->count),
     88              [r] "+r" (r)
    8989        );
    9090#endif
     
    9999#ifdef __PCC__
    100100        asm volatile (
    101                 "lock xaddq %1, %0\n"
    102                 : "+m" (val->count),
    103                   "+r" (r)
     101            "lock xaddq %1, %0\n"
     102            : "+m" (val->count),
     103              "+r" (r)
    104104        );
    105105#else
    106106        asm volatile (
    107                 "lock xaddq %[r], %[count]\n"
    108                 : [count] "+m" (val->count),
    109                   [r] "+r" (r)
     107            "lock xaddq %[r], %[count]\n"
     108            : [count] "+m" (val->count),
     109              [r] "+r" (r)
    110110        );
    111111#endif
  • uspace/lib/c/arch/arm32/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    5656         */
    5757        asm volatile (
    58                 "1:\n"
    59                 "       adr %[ret], 1b\n"
    60                 "       str %[ret], %[rp0]\n"
    61                 "       adr %[ret], 2f\n"
    62                 "       str %[ret], %[rp1]\n"
    63                 "       ldr %[ret], %[addr]\n"
    64                 "       cmp %[ret], %[ov]\n"
    65                 "       streq %[nv], %[addr]\n"
    66                 "2:\n"
    67                 "       moveq %[ret], #1\n"
    68                 "       movne %[ret], #0\n"
    69                 : [ret] "+&r" (ret),
    70                   [rp0] "=m" (ras_page[0]),
    71                   [rp1] "=m" (ras_page[1]),
    72                   [addr] "+m" (val->count)
    73                 : [ov] "r" (ov),
    74                   [nv] "r" (nv)
    75                 : "memory"
     58            "1:\n"
     59            "   adr %[ret], 1b\n"
     60            "   str %[ret], %[rp0]\n"
     61            "   adr %[ret], 2f\n"
     62            "   str %[ret], %[rp1]\n"
     63            "   ldr %[ret], %[addr]\n"
     64            "   cmp %[ret], %[ov]\n"
     65            "   streq %[nv], %[addr]\n"
     66            "2:\n"
     67            "   moveq %[ret], #1\n"
     68            "   movne %[ret], #0\n"
     69            : [ret] "+&r" (ret),
     70              [rp0] "=m" (ras_page[0]),
     71              [rp1] "=m" (ras_page[1]),
     72              [addr] "+m" (val->count)
     73            : [ov] "r" (ov),
     74              [nv] "r" (nv)
     75            : "memory"
    7676        );
    7777
    7878        ras_page[0] = 0;
    7979        asm volatile (
    80                 "" ::: "memory"
     80            "" ::: "memory"
    8181        );
    8282        ras_page[1] = 0xffffffff;
     
    103103         */
    104104        asm volatile (
    105                 "1:\n"
    106                 "       adr %[ret], 1b\n"
    107                 "       str %[ret], %[rp0]\n"
    108                 "       adr %[ret], 2f\n"
    109                 "       str %[ret], %[rp1]\n"
    110                 "       ldr %[ret], %[addr]\n"
    111                 "       add %[ret], %[ret], %[imm]\n"
    112                 "       str %[ret], %[addr]\n"
    113                 "2:\n"
    114                 : [ret] "+&r" (ret),
    115                   [rp0] "=m" (ras_page[0]),
    116                   [rp1] "=m" (ras_page[1]),
    117                   [addr] "+m" (val->count)
    118                 : [imm] "r" (i)
     105            "1:\n"
     106            "   adr %[ret], 1b\n"
     107            "   str %[ret], %[rp0]\n"
     108            "   adr %[ret], 2f\n"
     109            "   str %[ret], %[rp1]\n"
     110            "   ldr %[ret], %[addr]\n"
     111            "   add %[ret], %[ret], %[imm]\n"
     112            "   str %[ret], %[addr]\n"
     113            "2:\n"
     114            : [ret] "+&r" (ret),
     115              [rp0] "=m" (ras_page[0]),
     116              [rp1] "=m" (ras_page[1]),
     117              [addr] "+m" (val->count)
     118            : [imm] "r" (i)
    119119        );
    120120
    121121        ras_page[0] = 0;
    122122        asm volatile (
    123                 "" ::: "memory"
     123            "" ::: "memory"
    124124        );
    125125        ras_page[1] = 0xffffffff;
  • uspace/lib/c/arch/arm32/src/syscall.c

    r47b2d7e3 r1433ecda  
    6262
    6363        asm volatile (
    64                 "swi 0"
    65                 : "=r" (__arm_reg_r0)
    66                 : "r" (__arm_reg_r0),
    67                   "r" (__arm_reg_r1),
    68                   "r" (__arm_reg_r2),
    69                   "r" (__arm_reg_r3),
    70                   "r" (__arm_reg_r4),
    71                   "r" (__arm_reg_r5),
    72                   "r" (__arm_reg_r6)
     64            "swi 0"
     65            : "=r" (__arm_reg_r0)
     66            : "r" (__arm_reg_r0),
     67              "r" (__arm_reg_r1),
     68              "r" (__arm_reg_r2),
     69              "r" (__arm_reg_r3),
     70              "r" (__arm_reg_r4),
     71              "r" (__arm_reg_r5),
     72              "r" (__arm_reg_r6)
    7373        );
    7474
  • uspace/lib/c/arch/ia32/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    4444#ifdef __PCC__
    4545        asm volatile (
    46                 "lock incl %0\n"
    47                 : "+m" (val->count)
     46            "lock incl %0\n"
     47            : "+m" (val->count)
    4848        );
    4949#else
    5050        asm volatile (
    51                 "lock incl %[count]\n"
    52                 : [count] "+m" (val->count)
     51            "lock incl %[count]\n"
     52            : [count] "+m" (val->count)
    5353        );
    5454#endif
     
    5959#ifdef __PCC__
    6060        asm volatile (
    61                 "lock decl %0\n"
    62                 : "+m" (val->count)
     61            "lock decl %0\n"
     62            : "+m" (val->count)
    6363        );
    6464#else
    6565        asm volatile (
    66                 "lock decl %[count]\n"
    67                 : [count] "+m" (val->count)
     66            "lock decl %[count]\n"
     67            : [count] "+m" (val->count)
    6868        );
    6969#endif
     
    7676#ifdef __PCC__
    7777        asm volatile (
    78                 "lock xaddl %1, %0\n"
    79                 : "+m" (val->count),
    80                   "+r" (r)
     78            "lock xaddl %1, %0\n"
     79            : "+m" (val->count),
     80              "+r" (r)
    8181        );
    8282#else
    8383        asm volatile (
    84                 "lock xaddl %[r], %[count]\n"
    85                 : [count] "+m" (val->count),
    86                   [r] "+r" (r)
     84            "lock xaddl %[r], %[count]\n"
     85            : [count] "+m" (val->count),
     86              [r] "+r" (r)
    8787        );
    8888#endif
     
    9797#ifdef __PCC__
    9898        asm volatile (
    99                 "lock xaddl %1, %0\n"
    100                 : "+m" (val->count),
    101                   "+r" (r)
     99            "lock xaddl %1, %0\n"
     100            : "+m" (val->count),
     101              "+r" (r)
    102102        );
    103103#else
    104104        asm volatile (
    105                 "lock xaddl %[r], %[count]\n"
    106                 : [count] "+m" (val->count),
    107                   [r] "+r" (r)
     105            "lock xaddl %[r], %[count]\n"
     106            : [count] "+m" (val->count),
     107              [r] "+r" (r)
    108108        );
    109109#endif
  • uspace/lib/c/arch/ia32/include/libarch/ddi.h

    r47b2d7e3 r1433ecda  
    4444
    4545                asm volatile (
    46                         "inb %w[port], %b[val]\n"
    47                         : [val] "=a" (val)
    48                         : [port] "d" (port)
     46                    "inb %w[port], %b[val]\n"
     47                    : [val] "=a" (val)
     48                    : [port] "d" (port)
    4949                );
    5050
     
    6060
    6161                asm volatile (
    62                         "inw %w[port], %w[val]\n"
    63                         : [val] "=a" (val)
    64                         : [port] "d" (port)
     62                    "inw %w[port], %w[val]\n"
     63                    : [val] "=a" (val)
     64                    : [port] "d" (port)
    6565                );
    6666
     
    7676
    7777                asm volatile (
    78                         "inl %w[port], %[val]\n"
    79                         : [val] "=a" (val)
    80                         : [port] "d" (port)
     78                    "inl %w[port], %[val]\n"
     79                    : [val] "=a" (val)
     80                    : [port] "d" (port)
    8181                );
    8282
     
    9595        if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
    9696                asm volatile (
    97                         "outb %b[val], %w[port]\n"
    98                         :: [val] "a" (val), [port] "d" (port)
     97                    "outb %b[val], %w[port]\n"
     98                    :: [val] "a" (val), [port] "d" (port)
    9999                );
    100100        } else
     
    106106        if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
    107107                asm volatile (
    108                         "outw %w[val], %w[port]\n"
    109                         :: [val] "a" (val), [port] "d" (port)
     108                    "outw %w[val], %w[port]\n"
     109                    :: [val] "a" (val), [port] "d" (port)
    110110                );
    111111        } else
     
    117117        if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
    118118                asm volatile (
    119                         "outl %[val], %w[port]\n"
    120                         :: [val] "a" (val), [port] "d" (port)
     119                    "outl %[val], %w[port]\n"
     120                    :: [val] "a" (val), [port] "d" (port)
    121121                );
    122122        } else
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    r47b2d7e3 r1433ecda  
    207207{
    208208        /* Unused */
    209         (void)m; (void)rt; (void)rt_size;
     209        (void)m;
     210        (void)rt;
     211        (void)rt_size;
    210212}
    211213
  • uspace/lib/c/arch/ia32/src/tls.c

    r47b2d7e3 r1433ecda  
    6464} tls_index;
    6565
    66 void __attribute__ ((__regparm__ (1)))
     66void __attribute__((__regparm__(1)))
    6767    *___tls_get_addr(tls_index *ti);
    6868
    69 void __attribute__ ((__regparm__ (1)))
     69void __attribute__((__regparm__(1)))
    7070    *___tls_get_addr(tls_index *ti)
    7171{
  • uspace/lib/c/arch/ia64/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    4545
    4646        asm volatile (
    47                 "fetchadd8.rel %[v] = %[count], 1\n"
    48                 : [v] "=r" (v),
    49                   [count] "+m" (val->count)
     47            "fetchadd8.rel %[v] = %[count], 1\n"
     48            : [v] "=r" (v),
     49              [count] "+m" (val->count)
    5050        );
    5151}
     
    5656
    5757        asm volatile (
    58                 "fetchadd8.rel %[v] = %[count], -1\n"
    59                 : [v] "=r" (v),
    60                   [count] "+m" (val->count)
     58            "fetchadd8.rel %[v] = %[count], -1\n"
     59            : [v] "=r" (v),
     60              [count] "+m" (val->count)
    6161        );
    6262}
     
    6767
    6868        asm volatile (
    69                 "fetchadd8.rel %[v] = %[count], 1\n"
    70                 : [v] "=r" (v),
    71                   [count] "+m" (val->count)
     69            "fetchadd8.rel %[v] = %[count], 1\n"
     70            : [v] "=r" (v),
     71              [count] "+m" (val->count)
    7272        );
    7373
     
    8080
    8181        asm volatile (
    82                 "fetchadd8.rel %[v] = %[count], -1\n"
    83                 : [v] "=r" (v),
    84                   [count] "+m" (val->count)
     82            "fetchadd8.rel %[v] = %[count], -1\n"
     83            : [v] "=r" (v),
     84              [count] "+m" (val->count)
    8585        );
    8686
     
    9393
    9494        asm volatile (
    95                 "fetchadd8.rel %[v] = %[count], 1\n"
    96                 : [v] "=r" (v),
    97                   [count] "+m" (val->count)
     95            "fetchadd8.rel %[v] = %[count], 1\n"
     96            : [v] "=r" (v),
     97              [count] "+m" (val->count)
    9898        );
    9999
     
    106106
    107107        asm volatile (
    108                 "fetchadd8.rel %[v] = %[count], -1\n"
    109                 : [v] "=r" (v),
    110                   [count] "+m" (val->count)
     108            "fetchadd8.rel %[v] = %[count], -1\n"
     109            : [v] "=r" (v),
     110              [count] "+m" (val->count)
    111111        );
    112112
  • uspace/lib/c/arch/ia64/src/stacktrace.c

    r47b2d7e3 r1433ecda  
    4343bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
    4444{
    45         (void) st; (void) fp;
     45        (void) st;
     46        (void) fp;
    4647        return false;
    4748}
     
    4950errno_t stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
    5051{
    51         (void) st; (void) fp; (void) prev;
     52        (void) st;
     53        (void) fp;
     54        (void) prev;
    5255        return ENOTSUP;
    5356}
     
    5558errno_t stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
    5659{
    57         (void) st; (void) fp; (void) ra;
     60        (void) st;
     61        (void) fp;
     62        (void) ra;
    5863        return ENOTSUP;
    5964}
  • uspace/lib/c/arch/mips32/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    6464
    6565        asm volatile (
    66                 "1:\n"
    67                 "       ll %0, %1\n"
    68                 "       addu %0, %0, %3\n"      /* same as add, but never traps on overflow */
    69                 "       move %2, %0\n"
    70                 "       sc %0, %1\n"
    71                 "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    72                 "       nop\n"
    73                 : "=&r" (tmp),
    74                   "+m" (val->count),
    75                   "=&r" (v)
    76                 : "r" (i),
    77                   "i" (0)
     66            "1:\n"
     67            "   ll %0, %1\n"
     68            "   addu %0, %0, %3\n"      /* same as add, but never traps on overflow */
     69            "   move %2, %0\n"
     70            "   sc %0, %1\n"
     71            "   beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
     72            "   nop\n"
     73            : "=&r" (tmp),
     74              "+m" (val->count),
     75              "=&r" (v)
     76            : "r" (i),
     77              "i" (0)
    7878        );
    7979
  • uspace/lib/c/arch/mips32/src/stacktrace.c

    r47b2d7e3 r1433ecda  
    4343bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
    4444{
    45         (void) st; (void) fp;
     45        (void) st;
     46        (void) fp;
    4647        return false;
    4748}
     
    4950errno_t stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
    5051{
    51         (void) st; (void) fp; (void) prev;
     52        (void) st;
     53        (void) fp;
     54        (void) prev;
    5255        return ENOTSUP;
    5356}
     
    5558errno_t stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
    5659{
    57         (void) st; (void) fp; (void) ra;
     60        (void) st;
     61        (void) fp;
     62        (void) ra;
    5863        return ENOTSUP;
    5964}
  • uspace/lib/c/arch/mips32/src/syscall.c

    r47b2d7e3 r1433ecda  
    4848
    4949        asm volatile (
    50                 "syscall\n"
    51                 : "=r" (__mips_reg_v0)
    52                 : "r" (__mips_reg_a0),
    53                   "r" (__mips_reg_a1),
    54                   "r" (__mips_reg_a2),
    55                   "r" (__mips_reg_a3),
    56                   "r" (__mips_reg_t0),
    57                   "r" (__mips_reg_t1),
    58                   "r" (__mips_reg_v0)
     50            "syscall\n"
     51            : "=r" (__mips_reg_v0)
     52            : "r" (__mips_reg_a0),
     53              "r" (__mips_reg_a1),
     54              "r" (__mips_reg_a2),
     55              "r" (__mips_reg_a3),
     56              "r" (__mips_reg_t0),
     57              "r" (__mips_reg_t1),
     58              "r" (__mips_reg_v0)
    5959                /*
    6060                 * We are a function call, although C
    6161                 * does not know it.
    6262                 */
    63                 : "%ra"
     63            : "%ra"
    6464        );
    6565
  • uspace/lib/c/arch/mips32/src/tls.c

    r47b2d7e3 r1433ecda  
    3737#include <stddef.h>
    3838
    39 tcb_t * tls_alloc_arch(void **data, size_t size)
     39tcb_t *tls_alloc_arch(void **data, size_t size)
    4040{
    4141        return tls_alloc_variant_1(data, size);
  • uspace/lib/c/arch/ppc32/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    4545
    4646        asm volatile (
    47                 "1:\n"
    48                 "lwarx %0, 0, %2\n"
    49                 "addic %0, %0, 1\n"
    50                 "stwcx. %0, 0, %2\n"
    51                 "bne- 1b"
    52                 : "=&r" (tmp),
    53                   "=m" (val->count)
    54                 : "r" (&val->count),
    55                   "m" (val->count)
    56                 : "cc"
     47            "1:\n"
     48            "lwarx %0, 0, %2\n"
     49            "addic %0, %0, 1\n"
     50            "stwcx. %0, 0, %2\n"
     51            "bne- 1b"
     52            : "=&r" (tmp),
     53              "=m" (val->count)
     54            : "r" (&val->count),
     55              "m" (val->count)
     56            : "cc"
    5757        );
    5858}
     
    6363
    6464        asm volatile (
    65                 "1:\n"
    66                 "lwarx %0, 0, %2\n"
    67                 "addic %0, %0, -1\n"
    68                 "stwcx. %0, 0, %2\n"
    69                 "bne- 1b"
    70                 : "=&r" (tmp),
    71                   "=m" (val->count)
    72                 : "r" (&val->count),
    73                   "m" (val->count)
    74                 : "cc"
     65            "1:\n"
     66            "lwarx %0, 0, %2\n"
     67            "addic %0, %0, -1\n"
     68            "stwcx. %0, 0, %2\n"
     69            "bne- 1b"
     70            : "=&r" (tmp),
     71              "=m" (val->count)
     72            : "r" (&val->count),
     73              "m" (val->count)
     74            : "cc"
    7575        );
    7676}
  • uspace/lib/c/arch/ppc32/include/libarch/tls.h

    r47b2d7e3 r1433ecda  
    5050
    5151        asm volatile (
    52                 "mr %%r2, %0\n"
    53                 :
    54                 : "r" (tp)
     52            "mr %%r2, %0\n"
     53            :
     54            : "r" (tp)
    5555        );
    5656}
    5757
    58 static inline tcb_t * __tcb_get(void)
     58static inline tcb_t *__tcb_get(void)
    5959{
    60         void * retval;
     60        void *retval;
    6161
    6262        asm volatile (
    63                 "mr %0, %%r2\n"
    64                 : "=r" (retval)
     63            "mr %0, %%r2\n"
     64            : "=r" (retval)
    6565        );
    6666
  • uspace/lib/c/arch/ppc32/src/syscall.c

    r47b2d7e3 r1433ecda  
    4949
    5050        asm volatile (
    51                 "sc\n"
    52                 : "=r" (__ppc32_reg_r3)
    53                 : "r" (__ppc32_reg_r3),
    54                   "r" (__ppc32_reg_r4),
    55                   "r" (__ppc32_reg_r5),
    56                   "r" (__ppc32_reg_r6),
    57                   "r" (__ppc32_reg_r7),
    58                   "r" (__ppc32_reg_r8),
    59                   "r" (__ppc32_reg_r9)
     51            "sc\n"
     52            : "=r" (__ppc32_reg_r3)
     53            : "r" (__ppc32_reg_r3),
     54              "r" (__ppc32_reg_r4),
     55              "r" (__ppc32_reg_r5),
     56              "r" (__ppc32_reg_r6),
     57              "r" (__ppc32_reg_r7),
     58              "r" (__ppc32_reg_r8),
     59              "r" (__ppc32_reg_r9)
    6060        );
    6161
  • uspace/lib/c/arch/riscv64/src/entryjmp.c

    r47b2d7e3 r1433ecda  
    3636void entry_point_jmp(void *entry_point, void *pcb)
    3737{
    38         while (true);
     38        while (true)
     39                ;
    3940}
    4041
  • uspace/lib/c/arch/riscv64/src/fibril.c

    r47b2d7e3 r1433ecda  
    4040void __longjmp(context_t *ctx, int ret)
    4141{
    42         while (true);
     42        while (true)
     43                ;
    4344}
    4445
  • uspace/lib/c/arch/sparc64/include/libarch/atomic.h

    r47b2d7e3 r1433ecda  
    6363
    6464                asm volatile (
    65                         "casx %0, %2, %1\n"
    66                         : "+m" (*((atomic_count_t *) ptr)),
    67                           "+r" (b)
    68                         : "r" (a)
     65                    "casx %0, %2, %1\n"
     66                    : "+m" (*((atomic_count_t *) ptr)),
     67                      "+r" (b)
     68                    : "r" (a)
    6969                );
    7070        } while (a != b);
  • uspace/lib/c/arch/sparc64/include/libarch/ddi.h

    r47b2d7e3 r1433ecda  
    3939{
    4040        asm volatile (
    41                 "membar #LoadLoad | #StoreStore\n"
    42                 ::: "memory"
     41            "membar #LoadLoad | #StoreStore\n"
     42            ::: "memory"
    4343        );
    4444}
  • uspace/lib/c/arch/sparc64/include/libarch/elf_linux.h

    r47b2d7e3 r1433ecda  
    4747{
    4848        /* TODO */
    49         (void) istate; (void) elf_regs;
     49        (void) istate;
     50        (void) elf_regs;
    5051}
    5152
  • uspace/lib/c/generic/assert.c

    r47b2d7e3 r1433ecda  
    3939#include <stdint.h>
    4040
    41 static atomic_t failed_asserts = {0};
     41static atomic_t failed_asserts = { 0 };
    4242
    4343void __helenos_assert_quick_abort(const char *cond, const char *file, unsigned int line)
  • uspace/lib/c/generic/cap.c

    r47b2d7e3 r1433ecda  
    211211{
    212212        switch (c) {
    213         case '0': *val = 0; break;
    214         case '1': *val = 1; break;
    215         case '2': *val = 2; break;
    216         case '3': *val = 3; break;
    217         case '4': *val = 4; break;
    218         case '5': *val = 5; break;
    219         case '6': *val = 6; break;
    220         case '7': *val = 7; break;
    221         case '8': *val = 8; break;
    222         case '9': *val = 9; break;
     213        case '0':
     214                *val = 0;
     215                break;
     216        case '1':
     217                *val = 1;
     218                break;
     219        case '2':
     220                *val = 2;
     221                break;
     222        case '3':
     223                *val = 3;
     224                break;
     225        case '4':
     226                *val = 4;
     227                break;
     228        case '5':
     229                *val = 5;
     230                break;
     231        case '6':
     232                *val = 6;
     233                break;
     234        case '7':
     235                *val = 7;
     236                break;
     237        case '8':
     238                *val = 8;
     239                break;
     240        case '9':
     241                *val = 9;
     242                break;
    223243        default:
    224244                return EINVAL;
     
    275295
    276296                return EINVAL;
    277 found:
     297        found:
    278298                cap->cunit = i;
    279299        }
  • uspace/lib/c/generic/elf/elf_load.c

    r47b2d7e3 r1433ecda  
    7777        DPRINTF("Binary is dynamically linked.\n");
    7878#ifdef CONFIG_RTLD
    79         DPRINTF( "- prog dynamic: %p\n", info->finfo.dynamic);
     79        DPRINTF("- prog dynamic: %p\n", info->finfo.dynamic);
    8080
    8181        errno_t rc2 = rtld_prog_process(&info->finfo, &env);
  • uspace/lib/c/generic/fibril_synch.c

    r47b2d7e3 r1433ecda  
    7777                    context_get_pc(&oi->owned_by->ctx));
    7878                printf("Fibril %p waits for primitive %p.\n",
    79                      oi->owned_by, oi->owned_by->waits_for);
     79                    oi->owned_by, oi->owned_by->waits_for);
    8080                oi = oi->owned_by->waits_for;
    8181        }
     
    354354
    355355errno_t
    356 fibril_condvar_wait_timeout(fibril_condvar_t *fcv, fibril_mutex_t *fm,
     356    fibril_condvar_wait_timeout(fibril_condvar_t *fcv, fibril_mutex_t *fm,
    357357    suseconds_t timeout)
    358358{
  • uspace/lib/c/generic/inet/addr.c

    r47b2d7e3 r1433ecda  
    4949
    5050#if !(defined(__BE__) ^ defined(__LE__))
    51         #error The architecture must be either big-endian or little-endian.
     51#error The architecture must be either big-endian or little-endian.
    5252#endif
    5353
     
    6969static const inet_addr_t inet_addr_any_addr6 = {
    7070        .version = ip_v6,
    71         .addr6 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
     71        .addr6 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
    7272};
    7373
  • uspace/lib/c/generic/io/printf_core.c

    r47b2d7e3 r1433ecda  
    593593/** Prints a special double (ie NaN, infinity) padded to width characters. */
    594594static int print_special(ieee_double_t val, int width, uint32_t flags,
    595         printf_spec_t *ps)
     595    printf_spec_t *ps)
    596596{
    597597        assert(val.is_special);
     
    702702 */
    703703static int print_double_str_fixed(double_str_t *val_str, int precision, int width,
    704         uint32_t flags, printf_spec_t *ps)
     704    uint32_t flags, printf_spec_t *ps)
    705705{
    706706        int len = val_str->len;
     
    840840 */
    841841static int print_double_fixed(double g, int precision, int width, uint32_t flags,
    842         printf_spec_t *ps)
     842    printf_spec_t *ps)
    843843{
    844844        if (flags & __PRINTF_FLAG_LEFTALIGNED) {
     
    869869                 */
    870870                val_str.len = double_to_fixed_str(val, -1, precision + 1, buf, buf_size,
    871                         &val_str.dec_exp);
     871                    &val_str.dec_exp);
    872872
    873873                /*
     
    919919
    920920        exp_str[0] = '0' + exp_val / 100;
    921         exp_str[1] = '0' + (exp_val % 100) / 10 ;
     921        exp_str[1] = '0' + (exp_val % 100) / 10;
    922922        exp_str[2] = '0' + (exp_val % 10);
    923923
     
    938938 */
    939939static int print_double_str_scient(double_str_t *val_str, int precision,
    940         int width, uint32_t flags, printf_spec_t *ps)
     940    int width, uint32_t flags, printf_spec_t *ps)
    941941{
    942942        int len = val_str->len;
     
    10621062 */
    10631063static int print_double_scientific(double g, int precision, int width,
    1064         uint32_t flags, printf_spec_t *ps)
     1064    uint32_t flags, printf_spec_t *ps)
    10651065{
    10661066        if (flags & __PRINTF_FLAG_LEFTALIGNED) {
     
    10881088                 */
    10891089                val_str.len = double_to_fixed_str(val, precision + 2, -1, buf, buf_size,
    1090                         &val_str.dec_exp);
     1090                    &val_str.dec_exp);
    10911091
    10921092                /*
     
    11291129 */
    11301130static int print_double_generic(double g, int precision, int width,
    1131         uint32_t flags, printf_spec_t *ps)
     1131    uint32_t flags, printf_spec_t *ps)
    11321132{
    11331133        ieee_double_t val = extract_ieee_double(g);
     
    11561156                        precision = precision - (dec_exp + 1);
    11571157                        return print_double_fixed(g, precision, width,
    1158                                 flags | __PRINTF_FLAG_NOFRACZEROS, ps);
     1158                            flags | __PRINTF_FLAG_NOFRACZEROS, ps);
    11591159                } else {
    11601160                        --precision;
    11611161                        return print_double_scientific(g, precision, width,
    1162                                 flags | __PRINTF_FLAG_NOFRACZEROS, ps);
     1162                            flags | __PRINTF_FLAG_NOFRACZEROS, ps);
    11631163                }
    11641164        } else {
     
    12141214 */
    12151215static int print_double(double g, char spec, int precision, int width,
    1216         uint32_t flags, printf_spec_t *ps)
     1216    uint32_t flags, printf_spec_t *ps)
    12171217{
    12181218        switch (spec) {
     
    15431543                        case 'e':
    15441544                                retval = print_double(va_arg(ap, double), uc, precision,
    1545                                         width, flags, ps);
     1545                                    width, flags, ps);
    15461546
    15471547                                if (retval < 0) {
  • uspace/lib/c/generic/io/visualizer.c

    r47b2d7e3 r1433ecda  
    174174errno_t visualizer_update_damaged_region(async_sess_t *sess,
    175175    sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height,
    176         sysarg_t x_offset, sysarg_t y_offset)
     176    sysarg_t x_offset, sysarg_t y_offset)
    177177{
    178178        assert(x_offset <= UINT16_MAX);
  • uspace/lib/c/generic/io/vsnprintf.c

    r47b2d7e3 r1433ecda  
    170170        };
    171171        printf_spec_t ps = {
    172                 (int(*) (const char *, size_t, void *)) vsnprintf_str_write,
    173                 (int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
     172                (int (*) (const char *, size_t, void *)) vsnprintf_str_write,
     173                (int (*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
    174174                &data
    175175        };
  • uspace/lib/c/generic/l18n/langs.c

    r47b2d7e3 r1433ecda  
    5454         */
    5555        switch (locale) {
    56                 case L18N_WIN_LOCALE_AFRIKAANS:
    57                         return "Afrikaans";
    58                 case L18N_WIN_LOCALE_CZECH:
    59                         return "Czech";
    60                 case L18N_WIN_LOCALE_ENGLISH_UNITED_STATES:
    61                         return "English (US)";
    62                 case L18N_WIN_LOCALE_SLOVAK:
    63                         return "Slovak";
    64                 case L18N_WIN_LOCALE_SPANISH_TRADITIONAL:
    65                         return "Spanish (traditional)";
    66                 case L18N_WIN_LOCALE_ZULU:
    67                         return "Zulu";
    68                 default:
    69                         break;
     56        case L18N_WIN_LOCALE_AFRIKAANS:
     57                return "Afrikaans";
     58        case L18N_WIN_LOCALE_CZECH:
     59                return "Czech";
     60        case L18N_WIN_LOCALE_ENGLISH_UNITED_STATES:
     61                return "English (US)";
     62        case L18N_WIN_LOCALE_SLOVAK:
     63                return "Slovak";
     64        case L18N_WIN_LOCALE_SPANISH_TRADITIONAL:
     65                return "Spanish (traditional)";
     66        case L18N_WIN_LOCALE_ZULU:
     67                return "Zulu";
     68        default:
     69                break;
    7070        }
    7171
  • uspace/lib/c/generic/libc.c

    r47b2d7e3 r1433ecda  
    138138
    139139        /* Unreachable */
    140         while (1);
     140        while (1)
     141                ;
    141142}
    142143
     
    146147
    147148        /* Unreachable */
    148         while (1);
     149        while (1)
     150                ;
    149151}
    150152
  • uspace/lib/c/generic/mem.c

    r47b2d7e3 r1433ecda  
    5454        word_size = sizeof(unsigned long);
    5555        fill = word_size - ((uintptr_t) dest & (word_size - 1));
    56         if (fill > n) fill = n;
     56        if (fill > n)
     57                fill = n;
    5758
    5859        pb = dest;
     
    6465        /* Compute remaining size. */
    6566        n -= fill;
    66         if (n == 0) return dest;
     67        if (n == 0)
     68                return dest;
    6769
    6870        n_words = n / word_size;
     
    9395struct along {
    9496        unsigned long n;
    95 } __attribute__ ((packed));
     97} __attribute__((packed));
    9698
    9799static void *unaligned_memcpy(void *dst, const void *src, size_t n)
     
    133135        if (((uintptr_t) dst & (word_size - 1)) !=
    134136            ((uintptr_t) src & (word_size - 1)))
    135                 return unaligned_memcpy(dst, src, n);
     137                return unaligned_memcpy(dst, src, n);
    136138
    137139        /*
     
    143145        mod = (uintptr_t) dst & (word_size - 1);
    144146        fill = word_size - mod;
    145         if (fill > n) fill = n;
     147        if (fill > n)
     148                fill = n;
    146149
    147150        /* Copy the initial segment. */
     
    157160
    158161        n -= fill;
    159         if (n == 0) return dst;
     162        if (n == 0)
     163                return dst;
    160164
    161165        /* Pointers to aligned segment. */
  • uspace/lib/c/generic/pio_trace.c

    r47b2d7e3 r1433ecda  
    5050} region_t;
    5151
    52 static inline region_t * region_instance(link_t *l)
     52static inline region_t *region_instance(link_t *l)
    5353{
    5454        return list_get_instance(l, region_t, link);
    5555}
    5656
    57 static inline region_t * region_create(volatile void* base, size_t size,
    58     trace_fnc log, void* data)
     57static inline region_t *region_create(volatile void *base, size_t size,
     58    trace_fnc log, void *data)
    5959{
    6060        region_t *new_reg = malloc(sizeof(region_t));
     
    7979} pio_regions_t;
    8080
    81 static pio_regions_t * get_regions(void)
     81static pio_regions_t *get_regions(void)
    8282{
    8383        static pio_regions_t regions = {
  • uspace/lib/c/generic/rcu.c

    r47b2d7e3 r1433ecda  
    340340                list_foreach_safe(rcu.fibrils_list, fibril_it, next_fibril) {
    341341                        fibril_rcu_data_t *fib = member_to_inst(fibril_it,
    342                                 fibril_rcu_data_t, link);
     342                            fibril_rcu_data_t, link);
    343343
    344344                        if (is_preexisting_reader(fib, reader_group)) {
     
    405405                if (!list_empty(&rcu.sync_lock.blocked_fibrils)) {
    406406                        blocked_fibril_t *blocked_fib = member_to_inst(
    407                                 list_first(&rcu.sync_lock.blocked_fibrils), blocked_fibril_t, link);
     407                            list_first(&rcu.sync_lock.blocked_fibrils), blocked_fibril_t, link);
    408408
    409409                        if (!blocked_fib->is_ready) {
  • uspace/lib/c/generic/rtld/dynamic.c

    r47b2d7e3 r1433ecda  
    6565                d_val = dp->d_un.d_val;
    6666                DPRINTF("tag=%u ptr=0x%x val=%u\n", (unsigned)dp->d_tag,
    67                         (unsigned)d_ptr, (unsigned)d_val);
     67                    (unsigned)d_ptr, (unsigned)d_val);
    6868
    6969                switch (dp->d_tag) {
    7070
    71                 case DT_PLTRELSZ:       info->plt_rel_sz = d_val; break;
    72                 case DT_PLTGOT:         info->plt_got = d_ptr; break;
    73                 case DT_HASH:           info->hash = d_ptr; break;
    74                 case DT_STRTAB:         info->str_tab = d_ptr; break;
    75                 case DT_SYMTAB:         info->sym_tab = d_ptr; break;
    76                 case DT_RELA:           info->rela = d_ptr; break;
    77                 case DT_RELASZ:         info->rela_sz = d_val; break;
    78                 case DT_RELAENT:        info->rela_ent = d_val; break;
    79                 case DT_STRSZ:          info->str_sz = d_val; break;
    80                 case DT_SYMENT:         info->sym_ent = d_val; break;
    81                 case DT_INIT:           info->init = d_ptr; break;
    82                 case DT_FINI:           info->fini = d_ptr; break;
    83                 case DT_SONAME:         soname_idx = d_val; break;
    84                 case DT_RPATH:          rpath_idx = d_val; break;
    85                 case DT_SYMBOLIC:       info->symbolic = true; break;
    86                 case DT_REL:            info->rel = d_ptr; break;
    87                 case DT_RELSZ:          info->rel_sz = d_val; break;
    88                 case DT_RELENT:         info->rel_ent = d_val; break;
    89                 case DT_PLTREL:         info->plt_rel = d_val; break;
    90                 case DT_TEXTREL:        info->text_rel = true; break;
    91                 case DT_JMPREL:         info->jmp_rel = d_ptr; break;
    92                 case DT_BIND_NOW:       info->bind_now = true; break;
     71                case DT_PLTRELSZ:
     72                        info->plt_rel_sz = d_val;
     73                        break;
     74                case DT_PLTGOT:
     75                        info->plt_got = d_ptr;
     76                        break;
     77                case DT_HASH:
     78                        info->hash = d_ptr;
     79                        break;
     80                case DT_STRTAB:
     81                        info->str_tab = d_ptr;
     82                        break;
     83                case DT_SYMTAB:
     84                        info->sym_tab = d_ptr;
     85                        break;
     86                case DT_RELA:
     87                        info->rela = d_ptr;
     88                        break;
     89                case DT_RELASZ:
     90                        info->rela_sz = d_val;
     91                        break;
     92                case DT_RELAENT:
     93                        info->rela_ent = d_val;
     94                        break;
     95                case DT_STRSZ:
     96                        info->str_sz = d_val;
     97                        break;
     98                case DT_SYMENT:
     99                        info->sym_ent = d_val;
     100                        break;
     101                case DT_INIT:
     102                        info->init = d_ptr;
     103                        break;
     104                case DT_FINI:
     105                        info->fini = d_ptr;
     106                        break;
     107                case DT_SONAME:
     108                        soname_idx = d_val;
     109                        break;
     110                case DT_RPATH:
     111                        rpath_idx = d_val;
     112                        break;
     113                case DT_SYMBOLIC:
     114                        info->symbolic = true;
     115                        break;
     116                case DT_REL:
     117                        info->rel = d_ptr;
     118                        break;
     119                case DT_RELSZ:
     120                        info->rel_sz = d_val;
     121                        break;
     122                case DT_RELENT:
     123                        info->rel_ent = d_val;
     124                        break;
     125                case DT_PLTREL:
     126                        info->plt_rel = d_val;
     127                        break;
     128                case DT_TEXTREL:
     129                        info->text_rel = true;
     130                        break;
     131                case DT_JMPREL:
     132                        info->jmp_rel = d_ptr;
     133                        break;
     134                case DT_BIND_NOW:
     135                        info->bind_now = true;
     136                        break;
    93137
    94138                default:
     
    108152
    109153        DPRINTF("str_tab=0x%" PRIxPTR ", soname_idx=0x%x, soname=0x%" PRIxPTR "\n",
    110                 (uintptr_t)info->soname, soname_idx, (uintptr_t)info->soname);
     154            (uintptr_t)info->soname, soname_idx, (uintptr_t)info->soname);
    111155        DPRINTF("soname='%s'\n", info->soname);
    112156        DPRINTF("rpath='%s'\n", info->rpath);
     
    134178                        break;
    135179
    136                 default: break;
     180                default:
     181                        break;
    137182                }
    138183
  • uspace/lib/c/generic/rtld/module.c

    r47b2d7e3 r1433ecda  
    9191
    9292        /* Do not relocate twice. */
    93         if (m->relocated) return;
     93        if (m->relocated)
     94                return;
    9495
    9596        module_process_pre_arch(m);
     
    246247
    247248        while (dp->d_tag != DT_NULL) {
    248                 if (dp->d_tag == DT_NEEDED) ++n;
     249                if (dp->d_tag == DT_NEEDED)
     250                        ++n;
    249251                ++dp;
    250252        }
  • uspace/lib/c/generic/rtld/rtld.c

    r47b2d7e3 r1433ecda  
    186186         * Ascending addresses
    187187         */
    188         offset = 0; i = 1;
     188        offset = 0;
     189        i = 1;
    189190        list_foreach(rtld->imodules, imodules_link, module_t, m) {
    190191                assert(i == m->id);
     
    200201         * Descending addresses
    201202         */
    202         offset = 0; i = 1;
     203        offset = 0;
     204        i = 1;
    203205        list_foreach(rtld->imodules, imodules_link, module_t, m) {
    204206                assert(i == m->id);
  • uspace/lib/c/generic/rtld/symbol.c

    r47b2d7e3 r1433ecda  
    5555                h = (h << 4) + *name++;
    5656                g = h & 0xf0000000;
    57                 if (g != 0) h ^= g >> 24;
     57                if (g != 0)
     58                        h ^= g >> 24;
    5859                h &= ~g;
    5960        }
  • uspace/lib/c/generic/str.c

    r47b2d7e3 r1433ecda  
    4949/** Check the condition if wchar_t is signed */
    5050#ifdef __WCHAR_UNSIGNED__
    51         #define WCHAR_SIGNED_CHECK(cond)  (true)
     51#define WCHAR_SIGNED_CHECK(cond)  (true)
    5252#else
    53         #define WCHAR_SIGNED_CHECK(cond)  (cond)
     53#define WCHAR_SIGNED_CHECK(cond)  (cond)
    5454#endif
    5555
     
    164164                        /* 0xxxxxxx (Plain ASCII) */
    165165                        return b & 0x7f;
    166                 }
    167                 else if ((b & 0xe0) == 0xc0 || (b & 0xf0) == 0xe0 ||
     166                } else if ((b & 0xe0) == 0xc0 || (b & 0xf0) == 0xe0 ||
    168167                    (b & 0xf8) == 0xf0) {
    169168                        /* Start byte */
    170169                        size_t start_offset = *offset;
    171170                        return str_decode(str, &start_offset, size);
    172                 }
    173                 else if ((b & 0xc0) != 0x80) {
     171                } else if ((b & 0xc0) != 0x80) {
    174172                        /* Not a continuation byte */
    175173                        return U_SPECIAL;
     
    936934                                ch += (src[idx + 1] & 0x03FF);
    937935                                idx += 2;
    938                         }
    939                         else
     936                        } else
    940937                                break;
    941938                } else {
     
    983980                        idx++;
    984981                } else {
    985                          dest[idx] = c;
     982                        dest[idx] = c;
    986983                }
    987984
     
    11101107        size_t len = str_length(str);
    11111108
    1112         wchar_t *wstr = calloc(len+1, sizeof(wchar_t));
     1109        wchar_t *wstr = calloc(len + 1, sizeof(wchar_t));
    11131110        if (wstr == NULL)
    11141111                return NULL;
  • uspace/lib/c/generic/str_error.c

    r47b2d7e3 r1433ecda  
    5757#define __errno_entry(name, num, desc) #name,
    5858
    59 static const char* err_name[] = {
     59static const char *err_name[] = {
    6060#include <abi/errno.in>
    6161};
     
    6464#define __errno_entry(name, num, desc) "[" #name "]" desc,
    6565
    66 static const char* err_desc[] = {
     66static const char *err_desc[] = {
    6767#include <abi/errno.in>
    6868};
  • uspace/lib/c/generic/task.c

    r47b2d7e3 r1433ecda  
    346346 * @param wait task_wait_t previously initialized by task_setup_wait.
    347347 */
    348 void task_cancel_wait(task_wait_t *wait) {
     348void task_cancel_wait(task_wait_t *wait)
     349{
    349350        async_forget(wait->aid);
    350351}
  • uspace/lib/c/generic/thread.c

    r47b2d7e3 r1433ecda  
    105105 * @return Zero on success or a code from @ref errno.h on failure.
    106106 */
    107 errno_t thread_create(void (* function)(void *), void *arg, const char *name,
     107errno_t thread_create(void (*function)(void *), void *arg, const char *name,
    108108    thread_id_t *tid)
    109109{
     
    157157
    158158        /* Unreachable */
    159         while (1);
     159        while (1)
     160                ;
    160161}
    161162
  • uspace/lib/c/generic/vfs/canonify.c

    r47b2d7e3 r1433ecda  
    119119typedef struct {
    120120        state_t s;
    121         void (* f)(token_t *, token_t *, token_t *);
     121        void (*f)(token_t *, token_t *, token_t *);
    122122} change_state_t;
    123123
  • uspace/lib/c/generic/vfs/vfs.c

    r47b2d7e3 r1433ecda  
    13171317                *pos += cnt;
    13181318                rc = vfs_write_short(file, *pos, bp, nbyte - nwr, &cnt);
    1319         } while (rc == EOK && ((ssize_t )nbyte - nwr - cnt) > 0);
     1319        } while (rc == EOK && ((ssize_t)nbyte - nwr - cnt) > 0);
    13201320
    13211321        if (rc != EOK) {
  • uspace/lib/c/include/atomicdflt.h

    r47b2d7e3 r1433ecda  
    3737
    3838#ifndef LIBC_ARCH_ATOMIC_H_
    39         #error This file cannot be included directly, include atomic.h instead.
     39#error This file cannot be included directly, include atomic.h instead.
    4040#endif
    4141
  • uspace/lib/c/include/byteorder.h

    r47b2d7e3 r1433ecda  
    3939
    4040#if !(defined(__BE__) ^ defined(__LE__))
    41         #error The architecture must be either big-endian or little-endian.
     41#error The architecture must be either big-endian or little-endian.
    4242#endif
    4343
  • uspace/lib/c/include/ddi.h

    r47b2d7e3 r1433ecda  
    6969
    7070typedef void (*trace_fnc)(const volatile void *place, uint64_t val,
    71     volatile void* base, size_t size, void *data, bool write);
     71    volatile void *base, size_t size, void *data, bool write);
    7272
    7373extern errno_t pio_trace_enable(void *, size_t, trace_fnc, void *);
  • uspace/lib/c/include/getopt.h

    r47b2d7e3 r1433ecda  
    6161extern int optreset;
    6262
    63 int getopt_long(int, char * const *, const char *,
     63int getopt_long(int, char *const *, const char *,
    6464    const struct option *, int *);
    6565
    6666/* HelenOS Port : Expose legacy getopt() */
    67 int      getopt(int, char * const [], const char *);
     67int      getopt(int, char *const [], const char *);
    6868
    6969#endif /* !_GETOPT_H_ */
  • uspace/lib/c/include/io/pixelmap.h

    r47b2d7e3 r1433ecda  
    8181
    8282static inline void pixelmap_put_pixel(
    83     pixelmap_t * pixelmap,
     83    pixelmap_t *pixelmap,
    8484    sysarg_t x,
    8585    sysarg_t y,
     
    112112                x %= pixmap->width;
    113113                y %= pixmap->height;
    114         }
    115         else if (extend == PIXELMAP_EXTEND_SIDES ||
     114        } else if (extend == PIXELMAP_EXTEND_SIDES ||
    116115            extend == PIXELMAP_EXTEND_TRANSPARENT_SIDES) {
    117116                bool transparent_outside =
     
    120119                        x = 0;
    121120                        transparent = transparent_outside;
    122                 }
    123                 else if (((sysarg_t) x) >= pixmap->width) {
     121                } else if (((sysarg_t) x) >= pixmap->width) {
    124122                        x = pixmap->width - 1;
    125123                        transparent = transparent_outside;
     
    129127                        y = 0;
    130128                        transparent = transparent_outside;
    131                 }
    132                 else if (((sysarg_t) y) >= pixmap->height) {
     129                } else if (((sysarg_t) y) >= pixmap->height) {
    133130                        y = pixmap->height - 1;
    134131                        transparent = transparent_outside;
  • uspace/lib/c/include/ipc/devman.h

    r47b2d7e3 r1433ecda  
    112112
    113113        while (link != &ids->ids.head) {
    114                 mid = list_get_instance(link, match_id_t,link);
     114                mid = list_get_instance(link, match_id_t, link);
    115115                if (mid->score < id->score) {
    116116                        break;
  • uspace/lib/c/include/nic/nic.h

    r47b2d7e3 r1433ecda  
    444444 * @return true or false
    445445 */
    446 static inline int nic_wv_is_multi(nic_wv_type_t type) {
     446static inline int nic_wv_is_multi(nic_wv_type_t type)
     447{
    447448        switch (type) {
    448449        case NIC_WV_FULL_MATCH:
  • uspace/lib/c/include/stdio.h

    r47b2d7e3 r1433ecda  
    4444
    4545#ifndef SEEK_SET
    46         #define SEEK_SET  0
     46#define SEEK_SET  0
    4747#endif
    4848
    4949#ifndef SEEK_CUR
    50         #define SEEK_CUR  1
     50#define SEEK_CUR  1
    5151#endif
    5252
    5353#ifndef SEEK_END
    54         #define SEEK_END  2
     54#define SEEK_END  2
    5555#endif
    5656
     
    8282
    8383/* Formatted string output functions */
    84 extern int fprintf(FILE *, const char*, ...)
     84extern int fprintf(FILE *, const char *, ...)
    8585    _HELENOS_PRINTF_ATTRIBUTE(2, 3);
    8686extern int vfprintf(FILE *, const char *, va_list);
     
    9090extern int vprintf(const char *, va_list);
    9191
    92 extern int snprintf(char *, size_t , const char *, ...)
     92extern int snprintf(char *, size_t, const char *, ...)
    9393    _HELENOS_PRINTF_ATTRIBUTE(3, 4);
    9494extern int vasprintf(char **, const char *, va_list);
  • uspace/lib/c/include/unaligned.h

    r47b2d7e3 r1433ecda  
    3838#include <stdint.h>
    3939
    40 typedef int16_t unaligned_int16_t __attribute__ ((aligned(1)));
    41 typedef int32_t unaligned_int32_t __attribute__ ((aligned(1)));
    42 typedef int64_t unaligned_int64_t __attribute__ ((aligned(1)));
     40typedef int16_t unaligned_int16_t __attribute__((aligned(1)));
     41typedef int32_t unaligned_int32_t __attribute__((aligned(1)));
     42typedef int64_t unaligned_int64_t __attribute__((aligned(1)));
    4343
    44 typedef uint16_t unaligned_uint16_t __attribute__ ((aligned(1)));
    45 typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1)));
    46 typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1)));
     44typedef uint16_t unaligned_uint16_t __attribute__((aligned(1)));
     45typedef uint32_t unaligned_uint32_t __attribute__((aligned(1)));
     46typedef uint64_t unaligned_uint64_t __attribute__((aligned(1)));
    4747
    4848#endif
Note: See TracChangeset for help on using the changeset viewer.