Changeset f9d0a86 in mainline for uspace/lib
- Timestamp:
- 2017-11-14T12:24:42Z (8 years ago)
- 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)
- Location:
- uspace/lib
- Files:
-
- 3 added
- 30 deleted
- 105 edited
-
bithenge/Makefile (modified) (1 diff)
-
bithenge/src/print.c (modified) (1 diff)
-
c/Makefile (modified) (3 diffs)
-
c/arch/abs32le/Makefile.inc (modified) (2 diffs)
-
c/arch/abs32le/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/abs32le/include/libarch/inttypes.h (deleted)
-
c/arch/amd64/Makefile.inc (modified) (2 diffs)
-
c/arch/amd64/include/libarch/inttypes.h (deleted)
-
c/arch/amd64/include/libarch/types.h (deleted)
-
c/arch/arm32/Makefile.common (modified) (1 diff)
-
c/arch/arm32/Makefile.inc (modified) (2 diffs)
-
c/arch/arm32/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/arm32/include/libarch/inttypes.h (deleted)
-
c/arch/arm32/include/libarch/types.h (deleted)
-
c/arch/ia32/Makefile.inc (modified) (2 diffs)
-
c/arch/ia32/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/ia32/include/libarch/inttypes.h (deleted)
-
c/arch/ia32/include/libarch/stdint.h (deleted)
-
c/arch/ia64/Makefile.inc (modified) (2 diffs)
-
c/arch/ia64/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/ia64/include/libarch/faddr.h (modified) (1 diff)
-
c/arch/ia64/include/libarch/inttypes.h (deleted)
-
c/arch/ia64/include/libarch/stddef.h (deleted)
-
c/arch/ia64/include/libarch/stdint.h (deleted)
-
c/arch/ia64/src/entry.S (modified) (1 diff)
-
c/arch/ia64/src/thread_entry.S (modified) (1 diff)
-
c/arch/mips32/Makefile.common (modified) (1 diff)
-
c/arch/mips32/Makefile.inc (modified) (2 diffs)
-
c/arch/mips32/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/mips32/include/libarch/inttypes.h (deleted)
-
c/arch/mips32/include/libarch/stddef.h (deleted)
-
c/arch/mips32/include/libarch/stdint.h (deleted)
-
c/arch/mips32/include/libarch/types.h (deleted)
-
c/arch/mips32/src/entry.S (modified) (1 diff)
-
c/arch/mips32/src/thread_entry.S (modified) (1 diff)
-
c/arch/mips32eb/Makefile.common (modified) (1 diff)
-
c/arch/mips32eb/Makefile.inc (modified) (2 diffs)
-
c/arch/mips32eb/include/libarch/inttypes.h (deleted)
-
c/arch/mips32eb/include/libarch/stddef.h (deleted)
-
c/arch/mips32eb/include/libarch/stdint.h (deleted)
-
c/arch/mips32eb/include/libarch/types.h (deleted)
-
c/arch/ppc32/Makefile.common (modified) (1 diff)
-
c/arch/ppc32/Makefile.inc (modified) (2 diffs)
-
c/arch/ppc32/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/ppc32/include/libarch/inttypes.h (deleted)
-
c/arch/ppc32/include/libarch/stddef.h (deleted)
-
c/arch/ppc32/include/libarch/stdint.h (deleted)
-
c/arch/ppc32/include/libarch/types.h (deleted)
-
c/arch/riscv64/Makefile.common (modified) (1 diff)
-
c/arch/riscv64/Makefile.inc (modified) (2 diffs)
-
c/arch/riscv64/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/riscv64/include/libarch/inttypes.h (deleted)
-
c/arch/riscv64/include/libarch/stddef.h (deleted)
-
c/arch/riscv64/include/libarch/stdint.h (deleted)
-
c/arch/riscv64/include/libarch/types.h (deleted)
-
c/arch/sparc64/Makefile.inc (modified) (2 diffs)
-
c/arch/sparc64/include/libarch/ddi.h (modified) (2 diffs)
-
c/arch/sparc64/include/libarch/inttypes.h (deleted)
-
c/arch/sparc64/include/libarch/stddef.h (deleted)
-
c/arch/sparc64/include/libarch/stdint.h (deleted)
-
c/arch/sparc64/include/libarch/types.h (deleted)
-
c/generic/ddi.c (modified) (2 diffs)
-
c/generic/double_to_str.c (modified) (1 diff)
-
c/generic/gsort.c (modified) (1 diff)
-
c/generic/inet/addr.c (modified) (1 diff)
-
c/generic/io/printf_core.c (modified) (4 diffs)
-
c/generic/ipc.c (modified) (3 diffs)
-
c/generic/loc.c (modified) (3 diffs)
-
c/generic/pio_trace.c (modified) (1 diff)
-
c/generic/str.c (modified) (1 diff)
-
c/include/ddi.h (modified) (6 diffs)
-
c/include/inttypes.h (modified) (1 diff)
-
c/include/io/charfield.h (modified) (1 diff)
-
c/include/limits.h (modified) (1 diff)
-
c/include/stddef.h (modified) (1 diff)
-
c/include/stdint.h (modified) (1 diff)
-
c/include/types/common.h (modified) (1 diff)
-
c/include/wchar.h (added)
-
clui/Makefile (modified) (1 diff)
-
dltest/Makefile (modified) (1 diff)
-
draw/Makefile (modified) (1 diff)
-
draw/gfx/font-8x16.h (modified) (1 diff)
-
drv/Makefile (modified) (1 diff)
-
drv/generic/logbuf.c (modified) (1 diff)
-
drv/generic/remote_usb.c (modified) (1 diff)
-
drv/generic/remote_usbhc.c (modified) (4 diffs)
-
drv/include/ddf/interrupt.h (modified) (1 diff)
-
drv/include/usb_iface.h (modified) (1 diff)
-
drv/include/usbhc_iface.h (modified) (2 diffs)
-
drv/include/usbhid_iface.h (modified) (1 diff)
-
ext4/Makefile (modified) (1 diff)
-
fdisk/Makefile (modified) (1 diff)
-
fmtutil/Makefile (modified) (1 diff)
-
graph/Makefile (modified) (1 diff)
-
gui/Makefile (modified) (1 diff)
-
hound/Makefile (modified) (1 diff)
-
http/Makefile (modified) (1 diff)
-
http/include/http/receive-buffer.h (modified) (1 diff)
-
ieee80211/Makefile (modified) (1 diff)
-
label/Makefile (modified) (1 diff)
-
math/Makefile (modified) (1 diff)
-
math/include/mathtypes.h (modified) (1 diff)
-
minix/Makefile (added)
-
minix/minix.c (added)
-
nettl/Makefile (modified) (1 diff)
-
nic/Makefile (modified) (1 diff)
-
nic/include/nic_addr_db.h (modified) (1 diff)
-
nic/src/nic_addr_db.c (modified) (1 diff)
-
pcm/Makefile (modified) (1 diff)
-
pcut/Makefile (modified) (1 diff)
-
pcut/helenos.mak (modified) (1 diff)
-
pcut/update-from-master.sh (modified) (1 diff)
-
posix/Makefile (modified) (5 diffs)
-
posix/include/posix/limits.h (modified) (1 diff)
-
posix/include/posix/locale.h (modified) (1 diff)
-
posix/include/posix/stddef.h (modified) (1 diff)
-
posix/include/posix/stdint.h (modified) (2 diffs)
-
posix/include/posix/stdlib.h (modified) (1 diff)
-
posix/include/posix/string.h (modified) (1 diff)
-
posix/include/posix/strings.h (modified) (1 diff)
-
posix/include/posix/time.h (modified) (1 diff)
-
scsi/Makefile (modified) (1 diff)
-
softfloat/Makefile (modified) (1 diff)
-
softint/Makefile (modified) (1 diff)
-
softrend/Makefile (modified) (1 diff)
-
trackmod/xm.c (modified) (1 diff)
-
uri/Makefile (modified) (1 diff)
-
usb/Makefile (modified) (1 diff)
-
usb/include/usb/request.h (modified) (2 diffs)
-
usb/include/usb/usb.h (modified) (5 diffs)
-
usbdev/Makefile (modified) (1 diff)
-
usbhid/Makefile (modified) (1 diff)
-
usbhost/Makefile (modified) (1 diff)
-
usbhost/include/usb/host/hcd.h (modified) (2 diffs)
-
usbhost/include/usb/host/usb_transfer_batch.h (modified) (3 diffs)
-
usbhost/src/hcd.c (modified) (2 diffs)
-
usbhost/src/usb_transfer_batch.c (modified) (1 diff)
-
usbvirt/Makefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libbithenge 31 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -D__HELENOS__ -Iinclude 31 EXTRA_CFLAGS = -D__HELENOS__ 32 LIBS = block 32 33 33 34 SOURCES = \ -
uspace/lib/bithenge/src/print.c
r887c9de rf9d0a86 40 40 #include <stdarg.h> 41 41 #include <stdio.h> 42 #include <wchar.h> 42 43 #include <bithenge/blob.h> 43 44 #include <bithenge/print.h> -
uspace/lib/c/Makefile
r887c9de rf9d0a86 32 32 33 33 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 34 COMMON_HEADER_ARCH = arch/$(UARCH)/include/libarch/common.h35 34 36 35 LINKER_SCRIPTS = \ … … 40 39 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld 41 40 42 PRE_DEPEND = $(COMMON_HEADER_ARCH)41 PRE_DEPEND = 43 42 EXTRA_OUTPUT = $(LINKER_SCRIPTS) 44 EXTRA_CLEAN = $( COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)43 EXTRA_CLEAN = $(LINKER_SCRIPTS) 45 44 LIBRARY = libc 46 SLIBRARY = libc.so.0.0 47 LSONAME = libc.so.0 45 SOVERSION = 0.0 48 46 49 47 -include $(CONFIG_MAKEFILE) … … 208 206 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 209 207 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@ 210 211 $(COMMON_HEADER_ARCH): $(COMMON_HEADER)212 ln -sfn ../../../../$< $@ -
uspace/lib/c/arch/abs32le/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.c \31 30 arch/$(UARCH)/src/entryjmp.c \ 32 31 arch/$(UARCH)/src/thread_entry.c \ … … 36 35 arch/$(UARCH)/src/stacktrace.c 37 36 38 .PRECIOUS:arch/$(UARCH)/src/entry.o37 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/abs32le/include/libarch/ddi.h
r887c9de rf9d0a86 50 50 } 51 51 52 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 53 { 54 *port = v; 55 } 56 52 57 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 53 58 { … … 65 70 } 66 71 72 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 73 { 74 return *port; 75 } 76 67 77 #endif -
uspace/lib/c/arch/amd64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o 44 43 -
uspace/lib/c/arch/arm32/Makefile.common
r887c9de rf9d0a86 35 35 ifeq ($(CONFIG_FPU),y) 36 36 COMMON_CFLAGS += -mfloat-abi=hard 37 else38 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a39 37 endif 40 38 -
uspace/lib/c/arch/arm32/Makefile.inc
r887c9de rf9d0a86 29 29 30 30 ARCH_SOURCES = \ 31 arch/$(UARCH)/src/entry.S \32 31 arch/$(UARCH)/src/entryjmp.S \ 33 32 arch/$(UARCH)/src/thread_entry.S \ … … 43 42 arch/$(UARCH)/include/libarch/fibril_context.ag 44 43 45 .PRECIOUS:arch/$(UARCH)/src/entry.o44 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o 46 45 -
uspace/lib/c/arch/arm32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/ia32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 43 42 arch/$(UARCH)/include/libarch/fibril_context.ag 44 43 45 .PRECIOUS:arch/$(UARCH)/src/entry.o44 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ia32/include/libarch/ddi.h
r887c9de rf9d0a86 86 86 } 87 87 88 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 89 { 90 return (uint64_t) *port; 91 } 92 88 93 static inline void arch_pio_write_8(ioport8_t *port, uint8_t val) 89 94 { … … 119 124 } 120 125 126 static inline void arch_pio_write_64(ioport64_t *port, uint64_t val) 127 { 128 *port = val; 129 } 130 121 131 #endif -
uspace/lib/c/arch/ia64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 42 41 arch/$(UARCH)/include/libarch/fibril_context.ag 43 42 44 .PRECIOUS:arch/$(UARCH)/src/entry.o43 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ia64/include/libarch/ddi.h
r887c9de rf9d0a86 94 94 } 95 95 96 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 97 { 98 *port = v; 99 100 asm volatile ("mf\n" ::: "memory"); 101 asm volatile ("mf.a\n" ::: "memory"); 102 } 103 96 104 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 97 105 { … … 154 162 } 155 163 164 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 165 { 166 uint64_t v; 167 168 asm volatile ("mf\n" ::: "memory"); 169 170 v = *port; 171 172 asm volatile ("mf.a\n" ::: "memory"); 173 174 return v; 175 } 176 156 177 #endif 157 178 -
uspace/lib/c/arch/ia64/include/libarch/faddr.h
r887c9de rf9d0a86 38 38 #include <types/common.h> 39 39 40 typedef struct { 41 uintptr_t fnc; 42 uintptr_t gp; 43 } __attribute__((may_alias)) fncptr_t; 44 40 45 /** 41 46 * -
uspace/lib/c/arch/ia64/src/entry.S
r887c9de rf9d0a86 42 42 43 43 # Pass PCB pointer as the first argument to __main 44 mov out0 = r2 44 mov out0 = r2 ;; 45 45 br.call.sptk.many b0 = __main 46 46 -
uspace/lib/c/arch/ia64/src/thread_entry.S
r887c9de rf9d0a86 43 43 # 44 44 45 mov out0 = r8 45 mov out0 = r8 ;; 46 46 br.call.sptk.many b0 = __thread_main 47 47 -
uspace/lib/c/arch/mips32/Makefile.common
r887c9de rf9d0a86 28 28 29 29 COMMON_CFLAGS += -msoft-float -mabi=32 30 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a31 30 AS_PROLOG = .module softfloat;.abicalls; 32 31 LFLAGS += --gc-sections -
uspace/lib/c/arch/mips32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/mips32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/mips32/src/entry.S
r887c9de rf9d0a86 62 62 # 63 63 addiu $sp, ABI_STACK_FRAME 64 .end __entry 64 65 FUNCTION_END(__entry) -
uspace/lib/c/arch/mips32/src/thread_entry.S
r887c9de rf9d0a86 62 62 # 63 63 addiu $sp, ABI_STACK_FRAME 64 .end __thread_entry -
uspace/lib/c/arch/mips32eb/Makefile.common
r887c9de rf9d0a86 28 28 29 29 COMMON_CFLAGS += -msoft-float -mabi=32 30 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a31 30 AS_PROLOG = .module softfloat;.abicalls; 32 31 LFLAGS += --gc-sections -
uspace/lib/c/arch/mips32eb/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ppc32/Makefile.common
r887c9de rf9d0a86 34 34 35 35 COMMON_CFLAGS += -mcpu=powerpc -m$(FLOATS)-float -m32 36 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a37 36 AFLAGS += -a32 38 37 LFLAGS += --gc-sections -
uspace/lib/c/arch/ppc32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ppc32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/riscv64/Makefile.common
r887c9de rf9d0a86 27 27 # 28 28 29 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a30 31 29 ENDIANESS = LE 32 30 -
uspace/lib/c/arch/riscv64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.c \31 30 arch/$(UARCH)/src/entryjmp.c \ 32 31 arch/$(UARCH)/src/thread_entry.c \ … … 40 39 arch/$(UARCH)/include/libarch/fibril_context.ag 41 40 42 .PRECIOUS:arch/$(UARCH)/src/entry.o41 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/riscv64/include/libarch/ddi.h
r887c9de rf9d0a86 50 50 } 51 51 52 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 53 { 54 *port = v; 55 } 56 52 57 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 53 58 { … … 65 70 } 66 71 72 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 73 { 74 return *port; 75 } 76 67 77 #endif -
uspace/lib/c/arch/sparc64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 40 39 arch/$(UARCH)/include/libarch/fibril_context.ag 41 40 42 .PRECIOUS:arch/$(UARCH)/src/entry.o41 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/sparc64/include/libarch/ddi.h
r887c9de rf9d0a86 62 62 } 63 63 64 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 65 { 66 *port = v; 67 memory_barrier(); 68 } 69 70 64 71 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 65 72 { … … 92 99 } 93 100 101 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 102 { 103 uint64_t rv; 104 105 rv = *port; 106 memory_barrier(); 107 108 return rv; 109 } 110 94 111 #endif -
uspace/lib/c/generic/ddi.c
r887c9de rf9d0a86 338 338 } 339 339 340 void pio_write_64(ioport64_t *reg, uint64_t val) 341 { 342 pio_trace_log(reg, val, true); 343 arch_pio_write_64(reg, val); 344 } 345 340 346 uint8_t pio_read_8(const ioport8_t *reg) 341 347 { … … 359 365 } 360 366 367 uint64_t pio_read_64(const ioport64_t *reg) 368 { 369 const uint64_t val = arch_pio_read_64(reg); 370 pio_trace_log(reg, val, false); 371 return val; 372 } 373 361 374 /** @} 362 375 */ -
uspace/lib/c/generic/double_to_str.c
r887c9de rf9d0a86 32 32 #include <ieee_double.h> 33 33 34 #include <limits.h> 34 35 #include <stdint.h> 35 36 #include <stdbool.h> -
uspace/lib/c/generic/gsort.c
r887c9de rf9d0a86 41 41 42 42 #include <gsort.h> 43 #include <inttypes.h> 43 44 #include <mem.h> 44 45 #include <malloc.h> -
uspace/lib/c/generic/inet/addr.c
r887c9de rf9d0a86 41 41 #include <malloc.h> 42 42 #include <bitops.h> 43 #include <inttypes.h> 43 44 44 45 #define INET_PREFIXSTRSIZE 5 -
uspace/lib/c/generic/io/printf_core.c
r887c9de rf9d0a86 46 46 #include <assert.h> 47 47 #include <macros.h> 48 #include <wchar.h> 48 49 49 50 … … 114 115 PrintfQualifierLongLong, 115 116 PrintfQualifierPointer, 116 PrintfQualifierSize 117 PrintfQualifierSize, 118 PrintfQualifierMax 117 119 } qualifier_t; 118 120 … … 1484 1486 uc = str_decode(fmt, &nxt, STR_NO_LIMIT); 1485 1487 break; 1488 case 'j': 1489 qualifier = PrintfQualifierMax; 1490 i = nxt; 1491 uc = str_decode(fmt, &nxt, STR_NO_LIMIT); 1492 break; 1486 1493 default: 1487 1494 /* Default type */ … … 1629 1636 number = (uint64_t) va_arg(ap, size_t); 1630 1637 break; 1638 case PrintfQualifierMax: 1639 size = sizeof(uintmax_t); 1640 number = (uint64_t) va_arg(ap, uintmax_t); 1641 break; 1631 1642 default: 1632 1643 /* Unknown qualifier */ -
uspace/lib/c/generic/ipc.c
r887c9de rf9d0a86 148 148 } 149 149 150 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {151 futex_unlock(&ipc_futex);152 153 call->u.msg.phoneid = phoneid;154 155 futex_down(&async_futex);156 list_append(&call->list, &queued_calls);157 158 call->fid = fibril_get_id();159 fibril_switch(FIBRIL_TO_MANAGER);160 /* Async futex unlocked by previous call */161 162 return;163 }164 165 150 call->u.callid = callid; 166 151 … … 210 195 ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, 211 196 imethod, arg1, arg2, arg3, arg4); 212 213 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {214 if (!call) {215 call = ipc_prepare_async(private, callback);216 if (!call) {217 futex_unlock(&ipc_futex);218 return;219 }220 }221 222 IPC_SET_IMETHOD(call->u.msg.data, imethod);223 IPC_SET_ARG1(call->u.msg.data, arg1);224 IPC_SET_ARG2(call->u.msg.data, arg2);225 IPC_SET_ARG3(call->u.msg.data, arg3);226 IPC_SET_ARG4(call->u.msg.data, arg4);227 228 /*229 * To achieve deterministic behavior, we always zero out the230 * arguments that are beyond the limits of the fast version.231 */232 233 IPC_SET_ARG5(call->u.msg.data, 0);234 }235 197 236 198 ipc_finish_async(callid, phoneid, call); … … 351 313 ipc_callid_t callid = 352 314 ipc_call_async_internal(call->u.msg.phoneid, &call->u.msg.data); 353 354 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY)355 break;356 315 357 316 list_remove(&call->list); -
uspace/lib/c/generic/loc.c
r887c9de rf9d0a86 247 247 sysarg_t retval = async_data_write_start(exch, name, str_size(name)); 248 248 249 loc_exchange_end(exch);250 251 249 if (retval != EOK) { 252 250 async_forget(req); 253 return retval;254 }255 256 exch = loc_exchange_begin(INTERFACE_LOC_SUPPLIER);251 loc_exchange_end(exch); 252 return retval; 253 } 254 257 255 async_connect_to_me(exch, 0, 0, 0); 258 loc_exchange_end(exch); 259 256 257 /* 258 * First wait for the answer and then end the exchange. The opposite 259 * order is generally wrong because it may lead to a deadlock under 260 * certain circumstances. 261 */ 260 262 async_wait_for(req, &retval); 263 loc_exchange_end(exch); 264 261 265 return retval; 262 266 } … … 276 280 sysarg_t retval = async_data_write_start(exch, fqsn, str_size(fqsn)); 277 281 278 279 282 if (retval != EOK) { 280 283 async_forget(req); … … 283 286 } 284 287 288 /* 289 * First wait for the answer and then end the exchange. The opposite 290 * order is generally wrong because it may lead to a deadlock under 291 * certain circumstances. 292 */ 285 293 async_wait_for(req, &retval); 286 294 loc_exchange_end(exch); -
uspace/lib/c/generic/pio_trace.c
r887c9de rf9d0a86 91 91 92 92 93 void pio_trace_log(const volatile void *r, uint 32_t val, bool write)93 void pio_trace_log(const volatile void *r, uint64_t val, bool write) 94 94 { 95 95 pio_regions_t *regions = get_regions(); -
uspace/lib/c/generic/str.c
r887c9de rf9d0a86 46 46 #include <align.h> 47 47 #include <mem.h> 48 #include <limits.h> 48 49 49 50 /** Check the condition if wchar_t is signed */ 50 #ifdef WCHAR_IS_UNSIGNED51 #ifdef __WCHAR_UNSIGNED__ 51 52 #define WCHAR_SIGNED_CHECK(cond) (true) 52 53 #else -
uspace/lib/c/include/ddi.h
r887c9de rf9d0a86 52 52 typedef volatile uint16_t ioport16_t; 53 53 typedef volatile uint32_t ioport32_t; 54 55 extern int device_assign_devno(void); 54 typedef volatile uint64_t ioport64_t; 56 55 57 56 extern int physmem_map(uintptr_t, size_t, unsigned int, void **); … … 69 68 extern int pio_disable(void *, size_t); 70 69 71 typedef void (*trace_fnc)(const volatile void *place, uint 32_t val,70 typedef void (*trace_fnc)(const volatile void *place, uint64_t val, 72 71 volatile void* base, size_t size, void *data, bool write); 73 72 74 73 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 75 extern void pio_trace_log(const volatile void *, uint 32_t val, bool write);74 extern void pio_trace_log(const volatile void *, uint64_t val, bool write); 76 75 extern void pio_trace_disable(void *); 77 76 … … 79 78 extern void pio_write_16(ioport16_t *, uint16_t); 80 79 extern void pio_write_32(ioport32_t *, uint32_t); 80 extern void pio_write_64(ioport64_t *, uint64_t); 81 81 82 82 extern uint8_t pio_read_8(const ioport8_t *); 83 83 extern uint16_t pio_read_16(const ioport16_t *); 84 84 extern uint32_t pio_read_32(const ioport32_t *); 85 extern uint64_t pio_read_64(const ioport64_t *); 85 86 86 87 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, … … 111 112 } 112 113 114 static 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 113 123 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 114 124 { … … 122 132 { 123 133 return pio_change_32(r, v, 0, d); 134 } 135 static 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); 124 138 } 125 139 … … 136 150 return pio_change_32(r, 0, v, d); 137 151 } 152 static 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 } 138 156 139 157 #endif -
uspace/lib/c/include/inttypes.h
r887c9de rf9d0a86 36 36 #define LIBC_INTTYPES_H_ 37 37 38 #include < libarch/inttypes.h>38 #include <_bits/inttypes.h> 39 39 40 40 #endif -
uspace/lib/c/include/io/charfield.h
r887c9de rf9d0a86 38 38 39 39 #include <stdbool.h> 40 #include <wchar.h> 40 41 #include <io/color.h> 41 42 #include <io/style.h> -
uspace/lib/c/include/limits.h
r887c9de rf9d0a86 36 36 #define LIBC_LIMITS_H_ 37 37 38 /* XXX Make this more accurate */ 39 #include <stdint.h> 40 #include <libarch/stdint.h> 38 #include <_bits/limits.h> 41 39 42 40 #endif -
uspace/lib/c/include/stddef.h
r887c9de rf9d0a86 36 36 #define LIBC_STDDEF_H_ 37 37 38 #include <libarch/stddef.h> 38 #include <_bits/size_t.h> 39 #include <_bits/ptrdiff_t.h> 40 #include <_bits/wchar_t.h> 39 41 40 #ifndef NULL 41 #define NULL ((void *) 0) 42 #endif 42 #include <_bits/NULL.h> 43 43 44 44 #define offsetof(type, member) \ -
uspace/lib/c/include/stdint.h
r887c9de rf9d0a86 36 36 #define LIBC_STDINT_H_ 37 37 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> 63 39 64 40 #endif -
uspace/lib/c/include/types/common.h
r887c9de rf9d0a86 36 36 #define LIBC_TYPES_COMMON_H_ 37 37 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> 39 47 40 48 #endif -
uspace/lib/clui/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -I.31 30 LIBRARY = libclui 32 31 -
uspace/lib/dltest/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libdltest 31 SLIBRARY = libdltest.so.0.0 32 LSONAME = libdltest.so.0 31 SOVERSION = 0.0 33 32 34 33 SOURCES = \ -
uspace/lib/draw/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libdraw 31 SLIBRARY = libdraw.so.0.0 32 LSONAME = libdraw.so.0 33 EXTRA_CFLAGS += -I$(LIBSOFTREND_PREFIX) -I$(LIBCOMPRESS_PREFIX) 31 LIBS = softrend compress 34 32 35 33 SOURCES = \ -
uspace/lib/draw/gfx/font-8x16.h
r887c9de rf9d0a86 38 38 #include <stdint.h> 39 39 #include <stdbool.h> 40 #include <stddef.h> 40 41 41 42 #define FONT_GLYPHS 2899 -
uspace/lib/drv/Makefile
r887c9de rf9d0a86 29 29 30 30 USPACE_PREFIX = ../.. 31 EXTRA_CFLAGS = \ 32 -Iinclude \ 33 -Igeneric/private \ 34 -I$(LIBUSB_PREFIX)/include \ 35 -I$(LIBUSBHOST_PREFIX)/include \ 36 -I$(LIBPCM_PREFIX)/include 31 EXTRA_CFLAGS = -Igeneric/private 37 32 LIBRARY = libdrv 33 LIBS = pcm 38 34 39 35 SOURCES = \ -
uspace/lib/drv/generic/logbuf.c
r887c9de rf9d0a86 31 31 */ 32 32 33 #include <libarch/common.h>34 33 #include <stdio.h> 35 34 #include <stddef.h> -
uspace/lib/drv/generic/remote_usb.c
r887c9de rf9d0a86 35 35 36 36 #include <async.h> 37 #include <assert.h> 37 38 #include <macros.h> 38 39 #include <errno.h> 39 40 #include <devman.h> 40 #include <usb/host/usb_transfer_batch.h>41 41 42 42 #include "usb_iface.h" -
uspace/lib/drv/generic/remote_usbhc.c
r887c9de rf9d0a86 39 39 #include <errno.h> 40 40 #include <devman.h> 41 #include <usb/host/usb_transfer_batch.h>42 41 43 42 #include "usbhc_iface.h" … … 445 444 } 446 445 447 static int callback_out( usb_transfer_batch_t *batch)448 { 449 async_transaction_t *trans = batch->on_complete_data;450 451 const int err = async_answer_0(trans->caller, batch->error);446 static int callback_out(void *arg, int error, size_t transfered_size) 447 { 448 async_transaction_t *trans = arg; 449 450 const int err = async_answer_0(trans->caller, error); 452 451 453 452 async_transaction_destroy(trans); … … 456 455 } 457 456 458 static int callback_in( usb_transfer_batch_t *batch)459 { 460 async_transaction_t *trans = batch->on_complete_data;457 static int callback_in(void *arg, int error, size_t transfered_size) 458 { 459 async_transaction_t *trans = arg; 461 460 462 461 if (trans->data_caller) { 463 if ( batch->error == EOK) {464 batch->error = async_data_read_finalize(trans->data_caller,465 trans->buffer, batch->transfered_size);462 if (error == EOK) { 463 error = async_data_read_finalize(trans->data_caller, 464 trans->buffer, transfered_size); 466 465 } else { 467 466 async_answer_0(trans->data_caller, EINTR); … … 469 468 } 470 469 471 const int err = async_answer_0(trans->caller, batch->error);470 const int err = async_answer_0(trans->caller, error); 472 471 async_transaction_destroy(trans); 473 472 return err; -
uspace/lib/drv/include/ddf/interrupt.h
r887c9de rf9d0a86 36 36 #define DDF_INTERRUPT_H_ 37 37 38 #include <libarch/common.h>39 38 #include <types/common.h> 40 39 #include <abi/ddi/irq.h> -
uspace/lib/drv/include/usb_iface.h
r887c9de rf9d0a86 40 40 #include "ddf/driver.h" 41 41 #include <async.h> 42 #include <usb/usb.h>43 42 44 43 typedef async_sess_t usb_dev_session_t; 44 45 /** USB speeds. */ 46 typedef enum { 47 /** USB 1.1 low speed (1.5Mbits/s). */ 48 USB_SPEED_LOW, 49 /** USB 1.1 full speed (12Mbits/s). */ 50 USB_SPEED_FULL, 51 /** USB 2.0 high speed (480Mbits/s). */ 52 USB_SPEED_HIGH, 53 /** USB 3.0 super speed (5Gbits/s). */ 54 USB_SPEED_SUPER, 55 /** Psuedo-speed serving as a boundary. */ 56 USB_SPEED_MAX 57 } usb_speed_t; 58 59 /** USB endpoint number type. 60 * Negative values could be used to indicate error. 61 */ 62 typedef int16_t usb_endpoint_t; 63 64 /** USB address type. 65 * Negative values could be used to indicate error. 66 */ 67 typedef int16_t usb_address_t; 68 69 /** USB address for the purposes of Transaction Translation. 70 */ 71 typedef struct { 72 usb_address_t address; 73 unsigned port; 74 } usb_tt_address_t; 75 76 /** USB transfer type. */ 77 typedef enum { 78 USB_TRANSFER_CONTROL = 0, 79 USB_TRANSFER_ISOCHRONOUS = 1, 80 USB_TRANSFER_BULK = 2, 81 USB_TRANSFER_INTERRUPT = 3 82 } usb_transfer_type_t; 83 84 /** USB data transfer direction. */ 85 typedef enum { 86 USB_DIRECTION_IN, 87 USB_DIRECTION_OUT, 88 USB_DIRECTION_BOTH 89 } usb_direction_t; 90 91 /** USB complete address type. 92 * Pair address + endpoint is identification of transaction recipient. 93 */ 94 typedef union { 95 struct { 96 usb_address_t address; 97 usb_endpoint_t endpoint; 98 } __attribute__((packed)); 99 uint32_t packed; 100 } usb_target_t; 101 102 /** Description of usb endpoint. 103 */ 104 typedef struct { 105 /** Endpoint number. */ 106 usb_endpoint_t endpoint_no; 107 108 /** Endpoint transfer type. */ 109 usb_transfer_type_t transfer_type; 110 111 /** Endpoint direction. */ 112 usb_direction_t direction; 113 114 /** Maximum packet size for the endpoint. */ 115 size_t max_packet_size; 116 117 /** Number of packets per frame/uframe. 118 * Only valid for HS INT and ISO transfers. All others should set to 1*/ 119 unsigned packets; 120 121 struct { 122 unsigned polling_interval; 123 } usb2; 124 125 struct { 126 unsigned max_burst; 127 unsigned max_streams; 128 } usb3; 129 } usb_endpoint_desc_t; 130 45 131 46 132 extern usb_dev_session_t *usb_dev_connect(devman_handle_t); -
uspace/lib/drv/include/usbhc_iface.h
r887c9de rf9d0a86 41 41 42 42 #include "ddf/driver.h" 43 #include "usb_iface.h" 43 44 #include <async.h> 44 #include <usb/usb.h>45 45 46 46 extern int usbhc_reserve_default_address(async_exch_t *, usb_speed_t); … … 57 57 size_t); 58 58 59 /** Defined in usb/host/usb_transfer_batch.h */ 60 typedef struct usb_transfer_batch usb_transfer_batch_t; 61 62 /** Callback for outgoing transfer - clone of usb_transfer_batch_callback_t */ 63 typedef int (*usbhc_iface_transfer_callback_t)(usb_transfer_batch_t *); 59 /** Callback for outgoing transfer */ 60 typedef int (*usbhc_iface_transfer_callback_t)(void *, int, size_t); 64 61 65 62 /** USB device communication interface. */ -
uspace/lib/drv/include/usbhid_iface.h
r887c9de rf9d0a86 38 38 39 39 #include "ddf/driver.h" 40 #include <usb/usb.h>41 40 42 41 extern int usbhid_dev_get_event_length(async_sess_t *, size_t *); -
uspace/lib/ext4/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libext4 31 EXTRA_CFLAGS = \ 32 -I$(LIBBLOCK_PREFIX) \ 33 -I$(LIBCRYPTO_PREFIX) \ 34 -I$(LIBFS_PREFIX) \ 35 -Iinclude 31 LIBS = block crypto fs 36 32 37 33 SOURCES = \ -
uspace/lib/fdisk/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude31 30 32 31 LIBRARY = libfdisk -
uspace/lib/fmtutil/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -I.31 30 LIBRARY = libfmtutil 32 31 -
uspace/lib/graph/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libgraph 31 SLIBRARY = libgraph.so.0.032 LSONAME = libgraph.so.033 31 34 32 SOURCES = \ -
uspace/lib/gui/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libgui 31 SLIBRARY = libgui.so.0.0 32 LSONAME = libgui.so.0 33 EXTRA_CFLAGS += -I$(LIBDRAW_PREFIX) -I$(LIBSOFTREND_PREFIX) -I$(LIBGRAPH_PREFIX) 31 LIBS = draw softrend graph 34 32 35 33 SOURCES = \ -
uspace/lib/hound/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude/hound -Iinclude -I$(LIBPCM_PREFIX)/include30 EXTRA_CFLAGS = -Iinclude/hound 31 31 LIBRARY = libhound 32 LIBS = pcm 32 33 33 34 SOURCES = \ -
uspace/lib/http/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libhttp 31 SLIBRARY = libhttp.so.0.032 LSONAME = libhttp.so.033 31 EXTRA_CFLAGS += -Iinclude 34 32 -
uspace/lib/http/include/http/receive-buffer.h
r887c9de rf9d0a86 39 39 #include <adt/list.h> 40 40 #include <stddef.h> 41 #include <types/common.h> 41 42 42 43 /** Receive data. -
uspace/lib/ieee80211/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libieee80211 31 32 LIBS = \ 33 $(LIBDRV_PREFIX)/libdrv.a \ 34 $(LIBNIC_PREFIX)/libnic.a \ 35 $(LIBCRYPTO_PREFIX)/libcrypto.a 36 37 EXTRA_CFLAGS += \ 38 -Iinclude \ 39 -I$(LIBDRV_PREFIX)/include \ 40 -I$(LIBNIC_PREFIX)/include \ 41 -I$(LIBCRYPTO_PREFIX) 31 LIBS = drv nic crypto 42 32 43 33 SOURCES = \ -
uspace/lib/label/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude31 30 32 31 LIBRARY = liblabel -
uspace/lib/math/Makefile
r887c9de rf9d0a86 33 33 34 34 LIBRARY = libmath 35 S LIBRARY = libmath.so.0.036 LSONAME = libmath.so.0 37 MATH = y 35 SOVERSION = 0.0 36 37 EXTRA_CFLAGS += -Iarch/$(UARCH)/include 38 38 39 39 -include $(CONFIG_MAKEFILE) -
uspace/lib/math/include/mathtypes.h
r887c9de rf9d0a86 191 191 #endif 192 192 193 194 #if defined(FLOAT_SIZE_32) 195 196 #ifndef float32_t 197 #define float32_t float 198 #endif 199 200 #elif defined(FLOAT_SIZE_64) 201 202 #ifndef float64_t 203 #define float64_t float 204 #endif 205 206 #elif defined(FLOAT_SIZE_96) 207 208 #ifndef float96_t 209 #define float96_t float 210 #endif 211 212 #elif defined(FLOAT_SIZE_128) 213 214 #ifndef float128_t 215 #define float128_t float 216 #endif 217 218 #endif 219 220 221 #if defined(DOUBLE_SIZE_32) 222 223 #ifndef float32_t 224 #define float32_t double 225 #endif 226 227 #elif defined(DOUBLE_SIZE_64) 228 229 #ifndef float64_t 230 #define float64_t double 231 #endif 232 233 #elif defined(DOUBLE_SIZE_96) 234 235 #ifndef float96_t 236 #define float96_t double 237 #endif 238 239 #elif defined(DOUBLE_SIZE_128) 240 241 #ifndef float128_t 242 #define float128_t double 243 #endif 244 245 #endif 246 247 248 #if defined(LONG_DOUBLE_SIZE_32) 249 250 #ifndef float32_t 251 #define float32_t long double 252 #endif 253 254 #elif defined(LONG_DOUBLE_SIZE_64) 255 256 #ifndef float64_t 257 #define float64_t long double 258 #endif 259 260 #elif defined(LONG_DOUBLE_SIZE_96) 261 262 #ifndef float96_t 263 #define float96_t long double 264 #endif 265 266 #elif defined(LONG_DOUBLE_SIZE_128) 267 268 #ifndef float128_t 269 #define float128_t long double 270 #endif 271 272 #endif 273 193 #if __SIZEOF_FLOAT__ == 4 194 #define float32_t float 195 #elif __SIZEOF_DOUBLE__ == 4 196 #define float32_t double 197 #elif __SIZEOF_LONG_DOUBLE__ == 4 198 #define float32_t long double 199 #endif 200 201 #if __SIZEOF_FLOAT__ == 8 202 #define float64_t float 203 #elif __SIZEOF_DOUBLE__ == 8 204 #define float64_t double 205 #elif __SIZEOF_LONG_DOUBLE__ == 8 206 #define float64_t long double 207 #endif 208 209 #if __SIZEOF_FLOAT__ == 12 210 #define float96_t float 211 #elif __SIZEOF_DOUBLE__ == 12 212 #define float96_t double 213 #elif __SIZEOF_LONG_DOUBLE__ == 12 214 #define float96_t long double 215 #endif 216 217 #if __SIZEOF_FLOAT__ == 16 218 #define float128_t float 219 #elif __SIZEOF_DOUBLE__ == 16 220 #define float128_t double 221 #elif __SIZEOF_LONG_DOUBLE__ == 16 222 #define float128_t long double 223 #endif 274 224 275 225 #ifdef float32_t -
uspace/lib/nettl/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude31 30 LIBRARY = libnettl 32 31 -
uspace/lib/nic/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libnic 31 EXTRA_CFLAGS += -DLIBNIC_INTERNAL -Iinclude -I$(LIBDRV_PREFIX)/include 31 EXTRA_CFLAGS += -DLIBNIC_INTERNAL 32 LIBS = drv 32 33 33 34 SOURCES = \ -
uspace/lib/nic/include/nic_addr_db.h
r887c9de rf9d0a86 44 44 45 45 #include <adt/hash_table.h> 46 #include <types/common.h> 46 47 47 48 /** -
uspace/lib/nic/src/nic_addr_db.c
r887c9de rf9d0a86 36 36 */ 37 37 #include "nic_addr_db.h" 38 #include "libarch/common.h"39 38 #include <assert.h> 40 39 #include <stdlib.h> -
uspace/lib/pcm/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude/pcm -Iinclude30 EXTRA_CFLAGS = -Iinclude/pcm 31 31 LIBRARY = libpcm 32 32 -
uspace/lib/pcut/Makefile
r887c9de rf9d0a86 35 35 all-test: $(SELF_TESTS) 36 36 37 test-libpcut-%: $( OUTPUT)38 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -o $@ $ ^ $(OUTPUT)$(BASE_LIBS)37 test-libpcut-%: $(LIBRARY).a 38 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -o $@ $(STARTUP) $^ $(LIBRARY).a $(BASE_LIBS) 39 39 -
uspace/lib/pcut/helenos.mak
r887c9de rf9d0a86 37 37 src/report/xml.c \ 38 38 src/run.c 39 EXTRA_CFLAGS = -D__helenos__ -Iinclude 39 40 EXTRA_CFLAGS = -D__helenos__ 40 41 LIBRARY = libpcut -
uspace/lib/pcut/update-from-master.sh
r887c9de rf9d0a86 79 79 all-test: $(SELF_TESTS) 80 80 81 test-libpcut-%: $( OUTPUT)82 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -o $@ $ ^ $(OUTPUT)$(BASE_LIBS)81 test-libpcut-%: $(LIBRARY).a 82 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -o $@ $(STARTUP) $^ $(LIBRARY).a $(BASE_LIBS) 83 83 84 84 EOF_MAKEFILE_TAIL -
uspace/lib/posix/Makefile
r887c9de rf9d0a86 30 30 USPACE_PREFIX = ../.. 31 31 LIBRARY = libposix 32 SLIBRARY = libposix.so.0.033 LSONAME = libposix.so.034 32 35 33 EXTRA_CFLAGS = -Iinclude/ … … 41 39 FIXED_POSIX_LIBRARY = libposixaslibc.a 42 40 FIXED_C_LIBRARY = libc4posix.a 41 MERGED_C_LIBRARY = libc.a 42 MERGE_LIBRARIES = \ 43 $(FIXED_C_LIBRARY) \ 44 $(FIXED_POSIX_LIBRARY) \ 45 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \ 46 $(LIBSOFTINT_PREFIX)/libsoftint.a 43 47 44 48 REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list … … 49 53 EXTRA_CLEAN = \ 50 54 $(INCLUDE_LIBC) \ 51 $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \ 52 $(COLLISIONS_LIST) 53 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) 55 $(REDEFS_HIDE_LIBC) \ 56 $(REDEFS_SHOW_LIBPOSIX) \ 57 $(COLLISIONS_LIST) \ 58 libc.o 59 60 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY) 54 61 55 62 SOURCES = \ … … 89 96 ln -s -f -n ../$^ $@ 90 97 91 $(FIXED_C_LIBRARY): $( REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)98 $(FIXED_C_LIBRARY): $(LIBC_FILE) $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) 92 99 $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@ 93 100 $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@ … … 96 103 $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBRARY).a $@ 97 104 $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@ 105 106 $(MERGED_C_LIBRARY): $(MERGE_LIBRARIES) 107 $(LD) --fatal-warnings -r -o libc.o --whole-archive $(MERGE_LIBRARIES) --no-whole-archive 108 $(AR) rc $@ libc.o 98 109 99 110 $(REDEFS_HIDE_LIBC): $(COLLISIONS_LIST) -
uspace/lib/posix/include/posix/limits.h
r887c9de rf9d0a86 42 42 #define PATH_MAX 256 43 43 44 /* it's probably a safe assumption */45 #undef CHAR_BIT46 #define CHAR_BIT 847 48 44 #endif /* POSIX_LIMITS_H_ */ 49 45 -
uspace/lib/posix/include/posix/locale.h
r887c9de rf9d0a86 40 40 #endif 41 41 42 #ifndef NULL 43 #define NULL ((void *) 0) 44 #endif 42 #include <_bits/NULL.h> 45 43 46 44 #ifndef __locale_t_defined -
uspace/lib/posix/include/posix/stddef.h
r887c9de rf9d0a86 42 42 #include "sys/types.h" 43 43 44 #ifndef NULL 45 #define NULL ((void *) 0) 46 #endif 44 #include <_bits/NULL.h> 47 45 48 46 #define offsetof(type,member) ((size_t) &(((type *) 0)->member)) -
uspace/lib/posix/include/posix/stdint.h
r887c9de rf9d0a86 42 42 #include "libc/stdint.h" 43 43 44 #undef INT8_MAX45 #undef INT8_MIN46 #define INT8_MAX 12747 #define INT8_MIN (-128)48 49 #undef UINT8_MAX50 #undef UINT8_MIN51 #define UINT8_MAX 25552 #define UINT8_MIN 053 54 #undef INT16_MAX55 #undef INT16_MIN56 #define INT16_MAX 3276757 #define INT16_MIN (-32768)58 59 #undef UINT16_MAX60 #undef UINT16_MIN61 #define UINT16_MAX 6553562 #define UINT16_MIN 063 64 #undef INT32_MAX65 #undef INT32_MIN66 #define INT32_MAX 214748364767 #define INT32_MIN (-INT32_MAX - 1)68 69 #undef UINT32_MAX70 #undef UINT32_MIN71 #define UINT32_MAX 4294967295U72 #define UINT32_MIN 0U73 74 #undef INT64_MAX75 #undef INT64_MIN76 #define INT64_MAX 9223372036854775807LL77 #define INT64_MIN (-INT64_MAX - 1LL)78 79 #undef UINT64_MAX80 #undef UINT64_MIN81 #define UINT64_MAX 18446744073709551615ULL82 #define UINT64_MIN 0ULL83 84 44 #undef OFF64_MAX 85 45 #undef OFF64_MIN … … 92 52 #define AOFF64_MIN UINT64_MIN 93 53 94 #undef INTMAX_MIN95 #undef INTMAX_MAX96 #define INTMAX_MIN INT64_MIN97 #define INTMAX_MAX INT64_MAX98 99 #undef UINTMAX_MIN100 #undef UINTMAX_MAX101 #define UINTMAX_MIN UINT64_MIN102 #define UINTMAX_MAX UINT64_MAX103 104 /*105 * Fast* and least* integer types.106 *107 * The definitions below are correct as long as uint8/16/32/64_t are defined.108 * Considering the entire rest of the system would break down if they were not,109 * these definitions are just fine.110 */111 typedef uint8_t uint_least8_t;112 typedef uint16_t uint_least16_t;113 typedef uint32_t uint_least32_t;114 typedef uint64_t uint_least64_t;115 116 typedef int8_t int_least8_t;117 typedef int16_t int_least16_t;118 typedef int32_t int_least32_t;119 typedef int64_t int_least64_t;120 121 typedef uint8_t uint_fast8_t;122 typedef uint16_t uint_fast16_t;123 typedef uint32_t uint_fast32_t;124 typedef uint64_t uint_fast64_t;125 126 typedef int8_t int_fast8_t;127 typedef int16_t int_fast16_t;128 typedef int32_t int_fast32_t;129 typedef int64_t int_fast64_t;130 131 54 #endif /* POSIX_STDINT_H_ */ 132 55 -
uspace/lib/posix/include/posix/stdlib.h
r887c9de rf9d0a86 43 43 #include "sys/types.h" 44 44 45 #ifndef NULL 46 #define NULL ((void *) 0) 47 #endif 45 #include <_bits/NULL.h> 48 46 49 47 #define RAND_MAX 714025 -
uspace/lib/posix/include/posix/string.h
r887c9de rf9d0a86 51 51 */ 52 52 53 #ifndef NULL 54 #define NULL ((void *) 0) 55 #endif 53 #include <_bits/NULL.h> 56 54 57 55 /* -
uspace/lib/posix/include/posix/strings.h
r887c9de rf9d0a86 42 42 43 43 44 #include <types/common.h>44 #include "libc/types/common.h" 45 45 46 46 /* Search Functions */ -
uspace/lib/posix/include/posix/time.h
r887c9de rf9d0a86 43 43 #include "sys/types.h" 44 44 45 #ifndef NULL 46 #define NULL ((void *) 0) 47 #endif 45 #include <_bits/NULL.h> 48 46 49 47 #ifndef CLOCKS_PER_SEC -
uspace/lib/scsi/Makefile
r887c9de rf9d0a86 28 28 29 29 USPACE_PREFIX = ../.. 30 EXTRA_CFLAGS = -Iinclude31 30 LIBRARY = libscsi 32 31 -
uspace/lib/softfloat/Makefile
r887c9de rf9d0a86 30 30 USPACE_PREFIX = ../.. 31 31 LIBRARY = libsoftfloat 32 MATH = y 32 EXTRA_CFLAGS += $(LIBMATH_INCLUDES_FLAGS) 33 33 34 34 SOURCES = \ -
uspace/lib/softint/Makefile
r887c9de rf9d0a86 31 31 EXTRA_CFLAGS = -Iinclude 32 32 LIBRARY = libsoftint 33 SLIBRARY = libsoftint.so.0.034 LSONAME = libsoftint.so.035 33 36 34 SOURCES = \ -
uspace/lib/softrend/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libsoftrend 31 SLIBRARY = libsoftrend.so.0.0 32 LSONAME = libsoftrend.so.0 33 MATH = y 31 LIBS = math 34 32 35 33 SOURCES = \ -
uspace/lib/trackmod/xm.c
r887c9de rf9d0a86 38 38 #include <stdlib.h> 39 39 #include <mem.h> 40 #include <types/common.h> 40 41 41 42 #include "byteorder.h" -
uspace/lib/uri/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = liburi 31 SLIBRARY = liburi.so.0.032 LSONAME = liburi.so.033 31 34 32 SOURCES = \ -
uspace/lib/usb/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libusb 31 EXTRA_CFLAGS += \ 32 -I$(LIBDRV_PREFIX)/include \ 33 -I$(LIBUSBDEV_PREFIX)/include \ 34 -Iinclude 31 LIBS = drv 35 32 36 33 SOURCES = \ -
uspace/lib/usb/include/usb/request.h
r887c9de rf9d0a86 37 37 38 38 #include <stdint.h> 39 #include <assert.h> 39 40 40 41 /** Standard device request. */ … … 107 108 } __attribute__ ((packed)) usb_device_request_setup_packet_t; 108 109 109 int assert[(sizeof(usb_device_request_setup_packet_t) == 8) ? 1: -1];110 static_assert(sizeof(usb_device_request_setup_packet_t) == 8); 110 111 111 112 /** How many toggles need to be reset */ -
uspace/lib/usb/include/usb/usb.h
r887c9de rf9d0a86 39 39 #include <stdint.h> 40 40 #include <types/common.h> 41 #include <usb_iface.h> 41 42 42 43 /** Convert 16bit value from native (host) endianness to USB endianness. */ … … 52 53 #define uint32_usb2host(n) uint32_t_le2host((n)) 53 54 54 55 /** USB transfer type. */56 typedef enum {57 USB_TRANSFER_CONTROL = 0,58 USB_TRANSFER_ISOCHRONOUS = 1,59 USB_TRANSFER_BULK = 2,60 USB_TRANSFER_INTERRUPT = 361 } usb_transfer_type_t;62 63 55 const char * usb_str_transfer_type(usb_transfer_type_t t); 64 56 const char * usb_str_transfer_type_short(usb_transfer_type_t t); 65 57 66 /** USB data transfer direction. */67 typedef enum {68 USB_DIRECTION_IN,69 USB_DIRECTION_OUT,70 USB_DIRECTION_BOTH71 } usb_direction_t;72 73 58 const char *usb_str_direction(usb_direction_t); 74 75 /** USB speeds. */76 typedef enum {77 /** USB 1.1 low speed (1.5Mbits/s). */78 USB_SPEED_LOW,79 /** USB 1.1 full speed (12Mbits/s). */80 USB_SPEED_FULL,81 /** USB 2.0 high speed (480Mbits/s). */82 USB_SPEED_HIGH,83 /** USB 3.0 super speed (5Gbits/s). */84 USB_SPEED_SUPER,85 /** Psuedo-speed serving as a boundary. */86 USB_SPEED_MAX87 } usb_speed_t;88 59 89 60 static inline bool usb_speed_is_11(const usb_speed_t s) … … 110 81 } usb_request_recipient_t; 111 82 112 /** USB address type.113 * Negative values could be used to indicate error.114 */115 typedef int16_t usb_address_t;116 117 typedef struct {118 usb_address_t address;119 unsigned port;120 } usb_tt_address_t;121 122 83 /** Default USB address. */ 123 84 #define USB_ADDRESS_DEFAULT 0 … … 139 100 } 140 101 141 /** USB endpoint number type.142 * Negative values could be used to indicate error.143 */144 typedef int16_t usb_endpoint_t;145 146 102 /** Default control endpoint */ 147 103 #define USB_ENDPOINT_DEFAULT_CONTROL 0 … … 162 118 (ep < USB11_ENDPOINT_MAX); 163 119 } 164 165 166 /** USB complete address type.167 * Pair address + endpoint is identification of transaction recipient.168 */169 typedef union {170 struct {171 usb_address_t address;172 usb_endpoint_t endpoint;173 } __attribute__((packed));174 uint32_t packed;175 } usb_target_t;176 177 /** Description of usb endpoint.178 */179 typedef struct {180 /** Endpoint number. */181 usb_endpoint_t endpoint_no;182 183 /** Endpoint transfer type. */184 usb_transfer_type_t transfer_type;185 186 /** Endpoint direction. */187 usb_direction_t direction;188 189 /** Maximum packet size for the endpoint. */190 size_t max_packet_size;191 192 /** Number of packets per frame/uframe.193 * Only valid for HS INT and ISO transfers. All others should set to 1*/194 unsigned packets;195 196 struct {197 unsigned polling_interval;198 } usb2;199 200 struct {201 unsigned max_burst;202 unsigned max_streams;203 } usb3;204 } usb_endpoint_desc_t;205 120 206 121 /** Check USB target for allowed values (address and endpoint). -
uspace/lib/usbdev/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libusbdev 31 EXTRA_CFLAGS += \ 32 -I$(LIBUSB_PREFIX)/include \ 33 -I$(LIBDRV_PREFIX)/include \ 34 -Iinclude 31 LIBS = usb drv 35 32 36 33 SOURCES = \ -
uspace/lib/usbhid/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libusbhid 31 EXTRA_CFLAGS += \ 32 -I$(LIBUSB_PREFIX)/include \ 33 -I$(LIBUSBDEV_PREFIX)/include \ 34 -I$(LIBDRV_PREFIX)/include \ 35 -Iinclude 31 LIBS = usb usbdev drv 36 32 37 33 SOURCES = \ -
uspace/lib/usbhost/Makefile
r887c9de rf9d0a86 30 30 LIBRARY = libusbhost 31 31 EXTRA_CFLAGS += \ 32 -I$(LIBUSB_PREFIX)/include \ 33 -I$(LIBDRV_PREFIX)/include \ 34 -Iinclude/usb/host \ 35 -Iinclude 32 -Iinclude/usb/host 33 LIBS = usb drv 36 34 37 35 SOURCES = \ -
uspace/lib/usbhost/include/usb/host/hcd.h
r887c9de rf9d0a86 46 46 #include <stddef.h> 47 47 #include <stdint.h> 48 #include <usbhc_iface.h> 48 49 49 50 typedef struct hcd hcd_t; … … 110 111 extern int hcd_send_batch(hcd_t *, device_t *, usb_target_t, 111 112 usb_direction_t direction, char *, size_t, uint64_t, 112 usb _transfer_batch_callback_t, void *, const char *);113 usbhc_iface_transfer_callback_t, void *, const char *); 113 114 114 115 extern ssize_t hcd_send_batch_sync(hcd_t *, device_t *, usb_target_t, -
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
r887c9de rf9d0a86 39 39 #include <usb/usb.h> 40 40 #include <usb/request.h> 41 #include <usbhc_iface.h> 41 42 42 43 #include <atomic.h> … … 49 50 typedef struct endpoint endpoint_t; 50 51 typedef struct bus bus_t; 51 typedef struct usb_transfer_batch usb_transfer_batch_t;52 53 /** Callback to be called on transfer. */54 typedef int (*usb_transfer_batch_callback_t)(usb_transfer_batch_t *);55 52 56 53 /** Structure stores additional data needed for communication with EP */ … … 69 66 70 67 /** Function called on completion */ 71 usb _transfer_batch_callback_t on_complete;68 usbhc_iface_transfer_callback_t on_complete; 72 69 /** Arbitrary data for the handler */ 73 70 void *on_complete_data; -
uspace/lib/usbhost/src/hcd.c
r887c9de rf9d0a86 82 82 int hcd_send_batch(hcd_t *hcd, device_t *device, usb_target_t target, 83 83 usb_direction_t direction, char *data, size_t size, uint64_t setup_data, 84 usb _transfer_batch_callback_t on_complete, void *arg, const char *name)84 usbhc_iface_transfer_callback_t on_complete, void *arg, const char *name) 85 85 { 86 86 assert(hcd); … … 153 153 } sync_data_t; 154 154 155 static int sync_transfer_complete( usb_transfer_batch_t *batch)155 static int sync_transfer_complete(void *arg, int error, size_t transfered_size) 156 156 { 157 sync_data_t *d = batch->on_complete_data;157 sync_data_t *d = arg; 158 158 assert(d); 159 d->transfered_size = batch->transfered_size;160 d->error = batch->error;159 d->transfered_size = transfered_size; 160 d->error = error; 161 161 fibril_mutex_lock(&d->done_mtx); 162 162 d->done = 1; -
uspace/lib/usbhost/src/usb_transfer_batch.c
r887c9de rf9d0a86 124 124 125 125 if (batch->on_complete) { 126 const int err = batch->on_complete(batch );126 const int err = batch->on_complete(batch->on_complete_data, batch->error, batch->transfered_size); 127 127 if (err) 128 128 usb_log_warning("batch %p failed to complete: %s", -
uspace/lib/usbvirt/Makefile
r887c9de rf9d0a86 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libusbvirt 31 32 31 EXTRA_CFLAGS = \ 33 -I$(LIBDRV_PREFIX)/include \34 -I$(LIBUSB_PREFIX)/include \35 -I$(LIBUSBDEV_PREFIX)/include \36 -Iinclude \37 32 -Iinclude/usbvirt 33 LIBS = drv usb usbdev 38 34 39 35 SOURCES = \
Note:
See TracChangeset
for help on using the changeset viewer.
