Changeset f9d0a86 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2017-11-14T12:24:42Z (8 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6cad776
Parents:
887c9de (diff), d2d142a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 01:04:19)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 12:24:42)
Message:

Merge tag '0.7.1'

The merge wasn't clean, because of changes in build system. The most
significant change was partial revert of usbhc callback refactoring,
which now does not take usb transfer batch, but few named fields again.

Location:
uspace/lib/c/include
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ddi.h

    r887c9de rf9d0a86  
    5252typedef volatile uint16_t ioport16_t;
    5353typedef volatile uint32_t ioport32_t;
    54 
    55 extern int device_assign_devno(void);
     54typedef volatile uint64_t ioport64_t;
    5655
    5756extern int physmem_map(uintptr_t, size_t, unsigned int, void **);
     
    6968extern int pio_disable(void *, size_t);
    7069
    71 typedef void (*trace_fnc)(const volatile void *place, uint32_t val,
     70typedef void (*trace_fnc)(const volatile void *place, uint64_t val,
    7271    volatile void* base, size_t size, void *data, bool write);
    7372
    7473extern int pio_trace_enable(void *, size_t, trace_fnc, void *);
    75 extern void pio_trace_log(const volatile void *, uint32_t val, bool write);
     74extern void pio_trace_log(const volatile void *, uint64_t val, bool write);
    7675extern void pio_trace_disable(void *);
    7776
     
    7978extern void pio_write_16(ioport16_t *, uint16_t);
    8079extern void pio_write_32(ioport32_t *, uint32_t);
     80extern void pio_write_64(ioport64_t *, uint64_t);
    8181
    8282extern uint8_t pio_read_8(const ioport8_t *);
    8383extern uint16_t pio_read_16(const ioport16_t *);
    8484extern uint32_t pio_read_32(const ioport32_t *);
     85extern uint64_t pio_read_64(const ioport64_t *);
    8586
    8687static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask,
     
    111112}
    112113
     114static inline uint64_t pio_change_64(ioport64_t *reg, uint64_t val,
     115    uint64_t mask, useconds_t delay)
     116{
     117        uint64_t v = pio_read_64(reg);
     118        udelay(delay);
     119        pio_write_64(reg, (v & ~mask) | val);
     120        return v;
     121}
     122
    113123static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d)
    114124{
     
    122132{
    123133        return pio_change_32(r, v, 0, d);
     134}
     135static inline uint64_t pio_set_64(ioport64_t *r, uint64_t v, useconds_t d)
     136{
     137        return pio_change_64(r, v, 0, d);
    124138}
    125139
     
    136150        return pio_change_32(r, 0, v, d);
    137151}
     152static inline uint64_t pio_clear_64(ioport64_t *r, uint64_t v, useconds_t d)
     153{
     154        return pio_change_64(r, 0, v, d);
     155}
    138156
    139157#endif
  • uspace/lib/c/include/inttypes.h

    r887c9de rf9d0a86  
    3636#define LIBC_INTTYPES_H_
    3737
    38 #include <libarch/inttypes.h>
     38#include <_bits/inttypes.h>
    3939
    4040#endif
  • uspace/lib/c/include/io/charfield.h

    r887c9de rf9d0a86  
    3838
    3939#include <stdbool.h>
     40#include <wchar.h>
    4041#include <io/color.h>
    4142#include <io/style.h>
  • uspace/lib/c/include/limits.h

    r887c9de rf9d0a86  
    3636#define LIBC_LIMITS_H_
    3737
    38 /* XXX Make this more accurate */
    39 #include <stdint.h>
    40 #include <libarch/stdint.h>
     38#include <_bits/limits.h>
    4139
    4240#endif
  • uspace/lib/c/include/stddef.h

    r887c9de rf9d0a86  
    3636#define LIBC_STDDEF_H_
    3737
    38 #include <libarch/stddef.h>
     38#include <_bits/size_t.h>
     39#include <_bits/ptrdiff_t.h>
     40#include <_bits/wchar_t.h>
    3941
    40 #ifndef NULL
    41         #define NULL  ((void *) 0)
    42 #endif
     42#include <_bits/NULL.h>
    4343
    4444#define offsetof(type, member) \
  • uspace/lib/c/include/stdint.h

    r887c9de rf9d0a86  
    3636#define LIBC_STDINT_H_
    3737
    38 #define INT8_MIN  INT8_C(0x80)
    39 #define INT8_MAX  INT8_C(0x7F)
    40 
    41 #define UINT8_MIN  UINT8_C(0)
    42 #define UINT8_MAX  UINT8_C(0xFF)
    43 
    44 #define INT16_MIN  INT16_C(0x8000)
    45 #define INT16_MAX  INT16_C(0x7FFF)
    46 
    47 #define UINT16_MIN  UINT16_C(0)
    48 #define UINT16_MAX  UINT16_C(0xFFFF)
    49 
    50 #define INT32_MIN  INT32_C(0x80000000)
    51 #define INT32_MAX  INT32_C(0x7FFFFFFF)
    52 
    53 #define UINT32_MIN  UINT32_C(0)
    54 #define UINT32_MAX  UINT32_C(0xFFFFFFFF)
    55 
    56 #define INT64_MIN  INT64_C(0x8000000000000000)
    57 #define INT64_MAX  INT64_C(0x7FFFFFFFFFFFFFFF)
    58 
    59 #define UINT64_MIN  UINT64_C(0)
    60 #define UINT64_MAX  UINT64_C(0xFFFFFFFFFFFFFFFF)
    61 
    62 #include <libarch/stdint.h>
     38#include <_bits/stdint.h>
    6339
    6440#endif
  • uspace/lib/c/include/types/common.h

    r887c9de rf9d0a86  
    3636#define LIBC_TYPES_COMMON_H_
    3737
    38 #include <libarch/types.h>
     38#if __SIZEOF_POINTER__ == 4
     39#define __32_BITS__
     40#elif __SIZEOF_POINTER__ == 8
     41#define __64_BITS__
     42#else
     43#error __SIZEOF_POINTER__ is not defined.
     44#endif
     45
     46#include <_bits/all.h>
    3947
    4048#endif
Note: See TracChangeset for help on using the changeset viewer.