Changeset d4475a44 in mainline


Ignore:
Timestamp:
2018-07-08T17:58:56Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
914c693
Parents:
6abff2a8
Message:

use uint8_t * instead of char *

Technically, there should be no difference on all current platforms. But
the intention is more clear and it is failproof.

Location:
uspace/lib/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/include/libarch/tls.h

    r6abff2a8 rd4475a44  
    6060static inline void __tcb_set(tcb_t *tcb)
    6161{
    62         char *tls = (char *) tcb;
     62        uint8_t *tls = (uint8_t *) tcb;
    6363        tls += sizeof(tcb_t) + ARM_TP_OFFSET;
    6464        asm volatile (
     
    7777static inline tcb_t *__tcb_get(void)
    7878{
    79         char *ret;
     79        uint8_t *ret;
    8080        asm volatile (
    8181            "mov %0, r9"
  • uspace/lib/c/arch/mips32/include/libarch/tls.h

    r6abff2a8 rd4475a44  
    4646#define CONFIG_TLS_VARIANT_1
    4747
     48#include <libc.h>
     49
    4850/*
    4951 * I did not find any specification (neither MIPS nor PowerPC), but
     
    6769static inline void __tcb_set(tcb_t *tcb)
    6870{
    69         char *tp = (char *) tcb;
     71        uint8_t *tp = (uint8_t *) tcb;
    7072        tp += MIPS_TP_OFFSET + sizeof(tcb_t);
    7173
     
    7577static inline tcb_t *__tcb_get(void)
    7678{
    77         char *retval;
     79        uint8_t *retval;
    7880
    7981        asm volatile ("add %0, $27, $0" : "=r" (retval));
  • uspace/lib/c/arch/ppc32/include/libarch/tls.h

    r6abff2a8 rd4475a44  
    3838#define CONFIG_TLS_VARIANT_1
    3939
     40#include <libc.h>
     41
    4042#define PPC_TP_OFFSET 0x7000
    4143
     
    4648static inline void __tcb_set(tcb_t *tcb)
    4749{
    48         char *tp = (char *) tcb;
     50        uint8_t *tp = (uint8_t *) tcb;
    4951        tp += PPC_TP_OFFSET + sizeof(tcb_t);
    5052
     
    5860static inline tcb_t *__tcb_get(void)
    5961{
    60         char *retval;
     62        uint8_t *retval;
    6163
    6264        asm volatile (
     
    6567        );
    6668
    67         return (tcb_t *)(retval - PPC_TP_OFFSET - sizeof(tcb_t));
     69        return (tcb_t *) (retval - PPC_TP_OFFSET - sizeof(tcb_t));
    6870}
    6971
  • uspace/lib/c/include/adt/list.h

    r6abff2a8 rd4475a44  
    4040#include <stdbool.h>
    4141#include <stddef.h>
     42#include <stdint.h>
    4243#include <trace.h>
    4344
     
    421422
    422423        list_remove(tmp);
    423         return (void *)(((char *) tmp) - offset);
     424        return (void *) (((uint8_t *) tmp) - offset);
    424425}
    425426
Note: See TracChangeset for help on using the changeset viewer.