Changeset 58563585 in mainline for uspace/lib/c


Ignore:
Timestamp:
2016-08-31T11:15:39Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10cb47e
Parents:
7a67416
Message:

code review and cstyle cleanup (no change in functionality)

Location:
uspace/lib/c
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/amd64/src/stacktrace_asm.S

    r7a67416 r58563585  
    4444        ret
    4545FUNCTION_END(stacktrace_pc_get)
    46 
  • uspace/lib/c/arch/arm32/src/eabi.S

    r7a67416 r58563585  
    9595        mov pc, lr
    9696FUNCTION_END(__aeabi_uldivmod)
    97 
  • uspace/lib/c/arch/arm32/src/stacktrace_asm.S

    r7a67416 r58563585  
    4444        mov pc, lr
    4545FUNCTION_END(stacktrace_pc_get)
    46 
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    r7a67416 r58563585  
    6969        uint32_t sym_size;
    7070        char *str_tab;
    71 
     71       
    7272        elf_symbol_t *sym_def;
    7373        module_t *dest;
     
    8080
    8181        DPRINTF("address: 0x%x, entries: %d\n", (uintptr_t)rt, rt_entries);
    82 
     82       
    8383        for (i = 0; i < rt_entries; ++i) {
    8484//              DPRINTF("symbol %d: ", i);
     
    171171                        memcpy(r_ptr, (const void *)sym_addr, sym_size);
    172172                        break;
    173 
     173                       
    174174                case R_386_RELATIVE:
    175175                        DPRINTF("fixup R_386_RELATIVE (b+a)\n");
  • uspace/lib/c/arch/ia32/src/syscall.S

    r7a67416 r58563585  
    6363FUNCTION_END(__syscall_slow)
    6464
    65 
    6665/** Syscall wrapper - SYSENTER version.
    6766 *
  • uspace/lib/c/arch/ia64/src/fibril.S

    r7a67416 r58563585  
    338338        br.ret.sptk.many b0
    339339FUNCTION_END(context_restore)
    340 
  • uspace/lib/c/arch/ia64/src/stacktrace_asm.S

    r7a67416 r58563585  
    4141FUNCTION_END(stacktrace_fp_get)
    4242FUNCTION_END(stacktrace_pc_get)
    43 
  • uspace/lib/c/arch/ia64/src/syscall.S

    r7a67416 r58563585  
    4545        br.ret.sptk.many b0
    4646FUNCTION_END(__syscall)
    47 
  • uspace/lib/c/arch/mips32/src/entryjmp.S

    r7a67416 r58563585  
    5151        addiu $sp, ABI_STACK_FRAME
    5252FUNCTION_END(entry_point_jmp)
    53 
  • uspace/lib/c/generic/async.c

    r7a67416 r58563585  
    991991 * @param callid Hash of the incoming call.
    992992 * @param call   Data of the incoming call.
     993 *
    993994 */
    994995static void process_notification(ipc_callid_t callid, ipc_call_t *call)
     
    13161317                fibril_t *fibril = (fibril_t *) __tcb_get()->fibril_data;
    13171318                unsigned oldsw = fibril->switches;
    1318 
     1319               
    13191320                process_notification(callid, call);
    1320 
     1321               
    13211322                if (oldsw != fibril->switches) {
    13221323                        /*
     
    13341335                        fibril_switch(FIBRIL_FROM_DEAD);
    13351336                }
     1337               
    13361338                return;
    13371339        }
  • uspace/lib/c/generic/dnsr.c

    r7a67416 r58563585  
    124124                return (int) retval;
    125125        }
    126 
     126       
    127127        size_t act_size = IPC_GET_ARG2(answer_cname);
    128128        assert(act_size <= DNSR_NAME_MAX_SIZE);
    129129       
    130130        cname_buf[act_size] = '\0';
    131 
     131       
    132132        info->cname = str_dup(cname_buf);
    133 
     133       
    134134        if (info->cname == NULL) {
    135135                free(info);
  • uspace/lib/c/generic/rtld/module.c

    r7a67416 r58563585  
    151151                }
    152152        }
    153 
     153       
    154154        return NULL; /* Not found */
    155155}
     
    167167        module_t *m;
    168168        int rc;
    169 
     169       
    170170        m = calloc(1, sizeof(module_t));
    171171        if (m == NULL) {
     
    173173                exit(1);
    174174        }
    175 
     175       
    176176        m->rtld = rtld;
    177177        m->id = rtld_get_next_id(rtld);
     
    217217        /* Insert into the list of loaded modules */
    218218        list_append(&m->modules_link, &rtld->modules);
    219 
     219       
    220220        /* Copy TLS info */
    221221        m->tdata = info.tls.tdata;
     
    223223        m->tbss_size = info.tls.tbss_size;
    224224        m->tls_align = info.tls.tls_align;
    225 
     225       
    226226        DPRINTF("tdata at %p size %zu, tbss size %zu\n",
    227227            m->tdata, m->tdata_size, m->tbss_size);
  • uspace/lib/c/generic/tls.c

    r7a67416 r58563585  
    7474        tcb_t *tcb;
    7575        size_t tls_size = &_tbss_end - &_tdata_start;
    76 
     76       
    7777#ifdef CONFIG_RTLD
    7878        if (runtime_env != NULL)
    7979                return rtld_tls_make(runtime_env);
    8080#endif
     81       
    8182        tcb = tls_alloc_arch(&data, tls_size);
    8283        if (!tcb)
    8384                return NULL;
    84 
     85       
    8586        /*
    8687         * Copy thread local data from the initialization image.
     
    118119        if (!tcb)
    119120                return NULL;
    120         *data = ((void *)tcb) + sizeof(tcb_t);
     121       
     122        *data = ((void *) tcb) + sizeof(tcb_t);
    121123#ifdef CONFIG_RTLD
    122124        tcb->dtv = NULL;
     
    148150{
    149151        tcb_t *tcb;
    150 
     152       
    151153        size = ALIGN_UP(size, &_tls_alignment);
    152154        *data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size);
  • uspace/lib/c/include/fibril.h

    r7a67416 r58563585  
    7979        fibril_owner_info_t *waits_for;
    8080
    81         unsigned switches;
     81        unsigned int switches;
    8282} fibril_t;
    8383
Note: See TracChangeset for help on using the changeset viewer.