Changes in / [c2efbb4:f516bc2] in mainline
- Files:
-
- 1 added
- 199 deleted
- 118 edited
-
HelenOS.config (modified) (4 diffs)
-
boot/Makefile.common (modified) (1 diff)
-
boot/arch/amd64/Makefile.inc (modified) (5 diffs, 1 prop)
-
boot/arch/arm32/loader/Makefile (modified) (2 diffs)
-
boot/arch/arm32/loader/Makefile.build (modified) (2 diffs)
-
boot/arch/ia64/loader/Makefile (modified) (2 diffs)
-
boot/arch/ia64/loader/Makefile.build (modified) (2 diffs)
-
boot/arch/mips32/loader/Makefile (modified) (2 diffs)
-
boot/arch/mips32/loader/Makefile.build (modified) (2 diffs)
-
boot/arch/ppc32/loader/Makefile (modified) (2 diffs)
-
boot/arch/ppc32/loader/Makefile.build (modified) (2 diffs)
-
boot/arch/sparc64/loader/Makefile (modified) (2 diffs)
-
boot/arch/sparc64/loader/Makefile.build (modified) (2 diffs)
-
contrib/conf/net-qe.bat (deleted)
-
contrib/conf/net-qe.sh (deleted)
-
defaults/amd64/Makefile.config (modified) (1 diff)
-
defaults/arm32/Makefile.config (modified) (1 diff)
-
defaults/ia32/Makefile.config (modified) (1 diff)
-
defaults/ia64/Makefile.config (modified) (1 diff)
-
defaults/mips32/Makefile.config (modified) (1 diff)
-
defaults/ppc32/Makefile.config (modified) (1 diff)
-
defaults/sparc64/Makefile.config (modified) (1 diff)
-
defaults/sparc64/sun4v/Makefile.config (modified) (1 diff)
-
defaults/special/Makefile.config (modified) (1 diff)
-
defaults/special/abs32le/Makefile.config (modified) (1 diff)
-
kernel/Makefile.build (modified) (5 diffs)
-
kernel/arch/abs32le/Makefile.inc (modified) (2 diffs)
-
kernel/arch/abs32le/include/asm.h (modified) (1 diff)
-
kernel/arch/abs32le/include/atomic.h (modified) (5 diffs)
-
kernel/arch/abs32le/include/barrier.h (modified) (3 diffs)
-
kernel/arch/abs32le/include/context.h (modified) (1 diff)
-
kernel/arch/abs32le/include/context_offset.h (modified) (1 diff)
-
kernel/arch/abs32le/include/memstr.h (modified) (1 diff)
-
kernel/arch/abs32le/include/mm/frame.h (modified) (2 diffs)
-
kernel/arch/abs32le/include/mm/page.h (modified) (4 diffs)
-
kernel/arch/abs32le/include/types.h (modified) (1 diff)
-
kernel/arch/abs32le/src/abs32le.c (modified) (6 diffs)
-
kernel/arch/abs32le/src/debug/stacktrace.c (modified) (1 diff)
-
kernel/arch/abs32le/src/smp/ipi.c (deleted)
-
kernel/arch/amd64/include/atomic.h (modified) (7 diffs)
-
kernel/arch/amd64/include/interrupt.h (modified) (1 diff)
-
kernel/arch/amd64/include/memstr.h (modified) (2 diffs)
-
kernel/arch/amd64/include/types.h (modified) (1 diff)
-
kernel/arch/amd64/src/amd64.c (modified) (1 diff)
-
kernel/arch/amd64/src/debugger.c (modified) (2 diffs)
-
kernel/arch/arm32/include/atomic.h (modified) (8 diffs)
-
kernel/arch/arm32/include/memstr.h (modified) (2 diffs)
-
kernel/arch/arm32/include/types.h (modified) (3 diffs)
-
kernel/arch/ia32/include/atomic.h (modified) (7 diffs)
-
kernel/arch/ia32/include/interrupt.h (modified) (1 diff)
-
kernel/arch/ia32/include/memstr.h (modified) (2 diffs)
-
kernel/arch/ia32/include/types.h (modified) (1 diff)
-
kernel/arch/ia32/src/ia32.c (modified) (1 diff)
-
kernel/arch/ia32/src/smp/ipi.c (modified) (1 diff)
-
kernel/arch/ia64/include/atomic.h (modified) (8 diffs)
-
kernel/arch/ia64/include/interrupt.h (modified) (1 diff)
-
kernel/arch/ia64/include/memstr.h (modified) (2 diffs)
-
kernel/arch/ia64/include/types.h (modified) (2 diffs)
-
kernel/arch/ia64/src/ia64.c (modified) (1 diff)
-
kernel/arch/mips32/include/atomic.h (modified) (6 diffs)
-
kernel/arch/mips32/include/memstr.h (modified) (2 diffs)
-
kernel/arch/mips32/include/smp/dorder.h (added)
-
kernel/arch/mips32/include/types.h (modified) (2 diffs)
-
kernel/arch/mips32/src/smp/dorder.c (modified) (2 diffs)
-
kernel/arch/ppc32/include/atomic.h (modified) (7 diffs)
-
kernel/arch/ppc32/include/memstr.h (modified) (2 diffs)
-
kernel/arch/ppc32/include/types.h (modified) (2 diffs)
-
kernel/arch/sparc64/include/atomic.h (modified) (4 diffs)
-
kernel/arch/sparc64/include/memstr.h (modified) (1 diff)
-
kernel/arch/sparc64/include/types.h (modified) (2 diffs)
-
kernel/genarch/include/softint/division.h (modified) (1 diff)
-
kernel/generic/include/atomic.h (modified) (2 diffs)
-
kernel/generic/include/console/console.h (modified) (1 diff)
-
kernel/generic/include/ipc/ipc.h (modified) (1 diff)
-
kernel/generic/include/panic.h (modified) (4 diffs)
-
kernel/generic/include/smp/ipi.h (modified) (2 diffs)
-
kernel/generic/src/console/console.c (modified) (1 diff)
-
kernel/generic/src/ddi/ddi.c (modified) (2 diffs)
-
kernel/generic/src/proc/scheduler.c (modified) (1 diff)
-
kernel/generic/src/smp/ipi.c (modified) (4 diffs)
-
kernel/test/fpu/fpu1_ia64.c (modified) (2 diffs)
-
kernel/test/fpu/fpu1_x86.c (modified) (2 diffs)
-
kernel/test/fpu/mips2.c (modified) (2 diffs)
-
kernel/test/fpu/sse1.c (modified) (2 diffs)
-
kernel/test/synch/rwlock5.c (modified) (1 diff)
-
kernel/test/synch/semaphore1.c (modified) (1 diff)
-
kernel/test/thread/thread1.c (modified) (2 diffs)
-
uspace/Makefile (modified) (1 diff)
-
uspace/app/tester/thread/thread1.c (modified) (1 diff)
-
uspace/doc/doxygroups.h (modified) (1 diff)
-
uspace/lib/Makefile.common (modified) (2 diffs)
-
uspace/lib/libc/Makefile (modified) (2 diffs)
-
uspace/lib/libc/arch/abs32le/Makefile.inc (deleted)
-
uspace/lib/libc/arch/abs32le/_link.ld.in (deleted)
-
uspace/lib/libc/arch/abs32le/include/atomic.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/config.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/ddi.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/entry.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/faddr.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/fibril.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/inttypes.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/istate.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/limits.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/syscall.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/thread.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/tls.h (deleted)
-
uspace/lib/libc/arch/abs32le/include/types.h (deleted)
-
uspace/lib/libc/arch/abs32le/src/entry.c (deleted)
-
uspace/lib/libc/arch/abs32le/src/fibril.c (deleted)
-
uspace/lib/libc/arch/abs32le/src/stacktrace.c (deleted)
-
uspace/lib/libc/arch/abs32le/src/syscall.c (deleted)
-
uspace/lib/libc/arch/abs32le/src/thread_entry.c (deleted)
-
uspace/lib/libc/arch/abs32le/src/tls.c (deleted)
-
uspace/lib/libc/arch/amd64/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/amd64/include/atomic.h (modified) (2 diffs)
-
uspace/lib/libc/arch/amd64/include/types.h (modified) (1 diff)
-
uspace/lib/libc/arch/arm32/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/arm32/include/atomic.h (modified) (12 diffs)
-
uspace/lib/libc/arch/arm32/include/types.h (modified) (1 diff)
-
uspace/lib/libc/arch/ia32/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/ia32/include/atomic.h (modified) (2 diffs)
-
uspace/lib/libc/arch/ia32/include/types.h (modified) (1 diff)
-
uspace/lib/libc/arch/ia64/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/ia64/include/atomic.h (modified) (6 diffs)
-
uspace/lib/libc/arch/ia64/include/types.h (modified) (1 diff)
-
uspace/lib/libc/arch/mips32/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/mips32/include/atomic.h (modified) (3 diffs)
-
uspace/lib/libc/arch/mips32/include/types.h (modified) (2 diffs)
-
uspace/lib/libc/arch/mips32eb/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/ppc32/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/ppc32/include/atomic.h (modified) (6 diffs)
-
uspace/lib/libc/arch/ppc32/include/types.h (modified) (2 diffs)
-
uspace/lib/libc/arch/sparc64/Makefile.inc (modified) (1 diff)
-
uspace/lib/libc/arch/sparc64/include/atomic.h (modified) (1 diff)
-
uspace/lib/libc/arch/sparc64/include/types.h (modified) (1 diff)
-
uspace/lib/libc/generic/async.c (modified) (1 diff)
-
uspace/lib/libc/generic/futex.c (modified) (2 diffs)
-
uspace/lib/libc/include/async.h (modified) (1 diff)
-
uspace/lib/libc/include/atomicdflt.h (modified) (1 diff)
-
uspace/lib/libc/include/ipc/services.h (modified) (1 diff)
-
uspace/lib/libc/include/stacktrace.h (modified) (1 diff)
-
uspace/lib/softfloat/arch/abs32le/include/functions.h (deleted)
-
uspace/srv/hid/kbd/Makefile.build (modified) (1 diff)
-
uspace/srv/loader/arch/abs32le/Makefile.inc (deleted)
-
uspace/srv/loader/arch/abs32le/_link.ld.in (deleted)
-
uspace/srv/loader/arch/abs32le/abs32le.c (deleted)
-
uspace/srv/loader/include/arch.h (modified) (1 diff)
-
uspace/srv/net/Doxyfile (deleted)
-
uspace/srv/net/Makefile (deleted)
-
uspace/srv/net/Makefile.module (deleted)
-
uspace/srv/net/app/echo/Makefile (deleted)
-
uspace/srv/net/app/echo/echo.c (deleted)
-
uspace/srv/net/app/nettest1/Makefile (deleted)
-
uspace/srv/net/app/nettest1/nettest1.c (deleted)
-
uspace/srv/net/app/nettest2/Makefile (deleted)
-
uspace/srv/net/app/nettest2/nettest2.c (deleted)
-
uspace/srv/net/app/parse.c (deleted)
-
uspace/srv/net/app/parse.h (deleted)
-
uspace/srv/net/app/ping/Makefile (deleted)
-
uspace/srv/net/app/ping/ping.c (deleted)
-
uspace/srv/net/app/print_error.c (deleted)
-
uspace/srv/net/app/print_error.h (deleted)
-
uspace/srv/net/cfg/modular/general (deleted)
-
uspace/srv/net/cfg/modular/lo (deleted)
-
uspace/srv/net/cfg/modular/ne2k (deleted)
-
uspace/srv/net/cfg/module/general (deleted)
-
uspace/srv/net/cfg/module/lo (deleted)
-
uspace/srv/net/cfg/module/ne2k (deleted)
-
uspace/srv/net/checksum.c (deleted)
-
uspace/srv/net/configuration.h (deleted)
-
uspace/srv/net/documentation.txt (deleted)
-
uspace/srv/net/err.h (deleted)
-
uspace/srv/net/il/arp/Makefile (deleted)
-
uspace/srv/net/il/arp/arp.c (deleted)
-
uspace/srv/net/il/arp/arp.h (deleted)
-
uspace/srv/net/il/arp/arp_header.h (deleted)
-
uspace/srv/net/il/arp/arp_messages.h (deleted)
-
uspace/srv/net/il/arp/arp_module.c (deleted)
-
uspace/srv/net/il/arp/arp_module.h (deleted)
-
uspace/srv/net/il/arp/arp_oc.h (deleted)
-
uspace/srv/net/il/arp/arp_remote.c (deleted)
-
uspace/srv/net/il/il_messages.h (deleted)
-
uspace/srv/net/il/ip/Makefile (deleted)
-
uspace/srv/net/il/ip/ip.c (deleted)
-
uspace/srv/net/il/ip/ip.h (deleted)
-
uspace/srv/net/il/ip/ip_client.c (deleted)
-
uspace/srv/net/il/ip/ip_header.h (deleted)
-
uspace/srv/net/il/ip/ip_messages.h (deleted)
-
uspace/srv/net/il/ip/ip_module.c (deleted)
-
uspace/srv/net/il/ip/ip_module.h (deleted)
-
uspace/srv/net/il/ip/ip_remote.c (deleted)
-
uspace/srv/net/include/arp_interface.h (deleted)
-
uspace/srv/net/include/byteorder.h (deleted)
-
uspace/srv/net/include/checksum.h (deleted)
-
uspace/srv/net/include/device.h (deleted)
-
uspace/srv/net/include/ethernet_lsap.h (deleted)
-
uspace/srv/net/include/ethernet_protocols.h (deleted)
-
uspace/srv/net/include/hardware.h (deleted)
-
uspace/srv/net/include/icmp_api.h (deleted)
-
uspace/srv/net/include/icmp_client.h (deleted)
-
uspace/srv/net/include/icmp_codes.h (deleted)
-
uspace/srv/net/include/icmp_common.h (deleted)
-
uspace/srv/net/include/icmp_interface.h (deleted)
-
uspace/srv/net/include/il_interface.h (deleted)
-
uspace/srv/net/include/in.h (deleted)
-
uspace/srv/net/include/in6.h (deleted)
-
uspace/srv/net/include/inet.h (deleted)
-
uspace/srv/net/include/ip_client.h (deleted)
-
uspace/srv/net/include/ip_codes.h (deleted)
-
uspace/srv/net/include/ip_interface.h (deleted)
-
uspace/srv/net/include/ip_protocols.h (deleted)
-
uspace/srv/net/include/net_interface.h (deleted)
-
uspace/srv/net/include/netdb.h (deleted)
-
uspace/srv/net/include/netif_interface.h (deleted)
-
uspace/srv/net/include/nil_interface.h (deleted)
-
uspace/srv/net/include/protocol_map.h (deleted)
-
uspace/srv/net/include/socket.h (deleted)
-
uspace/srv/net/include/socket_codes.h (deleted)
-
uspace/srv/net/include/socket_errno.h (deleted)
-
uspace/srv/net/include/tcp_codes.h (deleted)
-
uspace/srv/net/include/tl_interface.h (deleted)
-
uspace/srv/net/inet.c (deleted)
-
uspace/srv/net/messages.h (deleted)
-
uspace/srv/net/module.c (deleted)
-
uspace/srv/net/modules.c (deleted)
-
uspace/srv/net/modules.h (deleted)
-
uspace/srv/net/net/Makefile (deleted)
-
uspace/srv/net/net/net.c (deleted)
-
uspace/srv/net/net/net.h (deleted)
-
uspace/srv/net/net/net_bundle.c (deleted)
-
uspace/srv/net/net/net_messages.h (deleted)
-
uspace/srv/net/net/net_remote.c (deleted)
-
uspace/srv/net/net/net_standalone.c (deleted)
-
uspace/srv/net/net/start/Makefile (deleted)
-
uspace/srv/net/net/start/netstart.c (deleted)
-
uspace/srv/net/netif/dp8390/Makefile (deleted)
-
uspace/srv/net/netif/dp8390/dp8390.c (deleted)
-
uspace/srv/net/netif/dp8390/dp8390.h (deleted)
-
uspace/srv/net/netif/dp8390/dp8390_drv.h (deleted)
-
uspace/srv/net/netif/dp8390/dp8390_module.c (deleted)
-
uspace/srv/net/netif/dp8390/dp8390_port.h (deleted)
-
uspace/srv/net/netif/dp8390/local.h (deleted)
-
uspace/srv/net/netif/dp8390/ne2000.c (deleted)
-
uspace/srv/net/netif/dp8390/ne2000.h (deleted)
-
uspace/srv/net/netif/lo/Makefile (deleted)
-
uspace/srv/net/netif/lo/lo.c (deleted)
-
uspace/srv/net/netif/netif.c (deleted)
-
uspace/srv/net/netif/netif.h (deleted)
-
uspace/srv/net/netif/netif_messages.h (deleted)
-
uspace/srv/net/netif/netif_module.h (deleted)
-
uspace/srv/net/netif/netif_nil_bundle.c (deleted)
-
uspace/srv/net/netif/netif_remote.c (deleted)
-
uspace/srv/net/netif/netif_standalone.c (deleted)
-
uspace/srv/net/nil/eth/Makefile (deleted)
-
uspace/srv/net/nil/eth/eth.c (deleted)
-
uspace/srv/net/nil/eth/eth.h (deleted)
-
uspace/srv/net/nil/eth/eth_header.h (deleted)
-
uspace/srv/net/nil/eth/eth_module.c (deleted)
-
uspace/srv/net/nil/nil_messages.h (deleted)
-
uspace/srv/net/nil/nil_module.h (deleted)
-
uspace/srv/net/nil/nil_remote.c (deleted)
-
uspace/srv/net/nil/nildummy/Makefile (deleted)
-
uspace/srv/net/nil/nildummy/nildummy.c (deleted)
-
uspace/srv/net/nil/nildummy/nildummy.h (deleted)
-
uspace/srv/net/nil/nildummy/nildummy_module.c (deleted)
-
uspace/srv/net/self_test.c (deleted)
-
uspace/srv/net/self_test.h (deleted)
-
uspace/srv/net/socket/Makefile (deleted)
-
uspace/srv/net/socket/socket_client.c (deleted)
-
uspace/srv/net/socket/socket_core.c (deleted)
-
uspace/srv/net/socket/socket_core.h (deleted)
-
uspace/srv/net/socket/socket_messages.h (deleted)
-
uspace/srv/net/structures/char_map.c (deleted)
-
uspace/srv/net/structures/char_map.h (deleted)
-
uspace/srv/net/structures/dynamic_fifo.c (deleted)
-
uspace/srv/net/structures/dynamic_fifo.h (deleted)
-
uspace/srv/net/structures/generic_char_map.h (deleted)
-
uspace/srv/net/structures/generic_field.h (deleted)
-
uspace/srv/net/structures/int_map.h (deleted)
-
uspace/srv/net/structures/measured_strings.c (deleted)
-
uspace/srv/net/structures/measured_strings.h (deleted)
-
uspace/srv/net/structures/module_map.c (deleted)
-
uspace/srv/net/structures/module_map.h (deleted)
-
uspace/srv/net/structures/packet/packet.c (deleted)
-
uspace/srv/net/structures/packet/packet.h (deleted)
-
uspace/srv/net/structures/packet/packet_client.c (deleted)
-
uspace/srv/net/structures/packet/packet_client.h (deleted)
-
uspace/srv/net/structures/packet/packet_header.h (deleted)
-
uspace/srv/net/structures/packet/packet_messages.h (deleted)
-
uspace/srv/net/structures/packet/packet_remote.c (deleted)
-
uspace/srv/net/structures/packet/packet_server.c (deleted)
-
uspace/srv/net/structures/packet/packet_server.h (deleted)
-
uspace/srv/net/tl/icmp/Makefile (deleted)
-
uspace/srv/net/tl/icmp/icmp.c (deleted)
-
uspace/srv/net/tl/icmp/icmp.h (deleted)
-
uspace/srv/net/tl/icmp/icmp_api.c (deleted)
-
uspace/srv/net/tl/icmp/icmp_client.c (deleted)
-
uspace/srv/net/tl/icmp/icmp_common.c (deleted)
-
uspace/srv/net/tl/icmp/icmp_header.h (deleted)
-
uspace/srv/net/tl/icmp/icmp_messages.h (deleted)
-
uspace/srv/net/tl/icmp/icmp_module.c (deleted)
-
uspace/srv/net/tl/icmp/icmp_module.h (deleted)
-
uspace/srv/net/tl/icmp/icmp_remote.c (deleted)
-
uspace/srv/net/tl/tcp/Makefile (deleted)
-
uspace/srv/net/tl/tcp/tcp.c (deleted)
-
uspace/srv/net/tl/tcp/tcp.h (deleted)
-
uspace/srv/net/tl/tcp/tcp_header.h (deleted)
-
uspace/srv/net/tl/tcp/tcp_module.c (deleted)
-
uspace/srv/net/tl/tcp/tcp_module.h (deleted)
-
uspace/srv/net/tl/tl_common.c (deleted)
-
uspace/srv/net/tl/tl_common.h (deleted)
-
uspace/srv/net/tl/tl_messages.h (deleted)
-
uspace/srv/net/tl/udp/Makefile (deleted)
-
uspace/srv/net/tl/udp/udp.c (deleted)
-
uspace/srv/net/tl/udp/udp.h (deleted)
-
uspace/srv/net/tl/udp/udp_header.h (deleted)
-
uspace/srv/net/tl/udp/udp_module.c (deleted)
-
uspace/srv/net/tl/udp/udp_module.h (deleted)
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rc2efbb4 rf516bc2 258 258 259 259 % Compiler 260 @ "gcc_cross" GNU C Compiler (cross-compiler)261 260 @ "gcc_native" GNU C Compiler (native) 262 261 @ "clang" Clang … … 264 263 265 264 266 ## Cross-compiler target for abstract architecture267 268 % Cross-compiler target269 @ "arm32" ARM 32-bit270 @ "ia32" Intel IA-32271 @ "mips32" MIPS 32-bit272 ! [PLATFORM=abs32le&COMPILER=gcc_cross] CROSS_TARGET (choice)273 274 275 265 ## Kernel configuration 276 266 … … 294 284 295 285 % Software integer division support 296 ! [PLATFORM= abs32le|PLATFORM=ia32|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32] CONFIG_SOFTINT (y)286 ! [PLATFORM=ia32|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32] CONFIG_SOFTINT (y) 297 287 298 288 % ASID support … … 518 508 % Write core files 519 509 ! CONFIG_WRITE_CORE_FILES (n/y) 520 521 % Networking architecture522 @ "none" No networking523 @ "modular" Modular524 @ "module" One module525 ! NETWORKING (choice)526 527 % DP8390 (NE2k) network interface528 ! [NETWORKING=modular|NETWORKING=module] CONFIG_NETIF_DP8390 (y/n)529 -
boot/Makefile.common
rc2efbb4 rf516bc2 85 85 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 86 86 endif 87 88 CFG =89 90 NET_SRVS = \91 $(USPACEDIR)/srv/net/net/net \92 $(USPACEDIR)/srv/net/netif/lo/lo \93 $(USPACEDIR)/srv/net/netif/dp8390/dp8390 \94 $(USPACEDIR)/srv/net/nil/eth/eth \95 $(USPACEDIR)/srv/net/nil/nildummy/nildummy \96 $(USPACEDIR)/srv/net/app/echo/echo97 98 NET_APPS = \99 $(USPACEDIR)/srv/net/net/start/netstart \100 $(USPACEDIR)/srv/net/app/ping/ping \101 $(USPACEDIR)/srv/net/app/nettest1/nettest1 \102 $(USPACEDIR)/srv/net/app/nettest2/nettest2103 104 ifneq ($(NETWORKING), none)105 NET_CFG = \106 $(USPACEDIR)/srv/net/cfg/$(NETWORKING)/general \107 $(USPACEDIR)/srv/net/cfg/$(NETWORKING)/lo \108 $(USPACEDIR)/srv/net/cfg/$(NETWORKING)/ne2k109 endif110 111 ifeq ($(NETWORKING), module)112 RD_APPS += $(NET_APPS)113 114 RD_SRVS += $(NET_SRVS)115 116 CFG += $(NET_CFG)117 else118 ifeq ($(NETWORKING), modular)119 RD_APPS += $(NET_APPS)120 121 RD_SRVS += $(NET_SRVS)122 123 RD_SRVS += $(USPACEDIR)/srv/net/il/ip/ip \124 $(USPACEDIR)/srv/net/il/arp/arp \125 $(USPACEDIR)/srv/net/tl/udp/udp \126 $(USPACEDIR)/srv/net/tl/tcp/tcp \127 $(USPACEDIR)/srv/net/tl/icmp/icmp128 129 CFG += $(NET_CFG)130 endif131 endif132 -
boot/arch/amd64/Makefile.inc
-
Property mode
changed from
100755to100644
rc2efbb4 rf516bc2 39 39 build: $(BASE)/image.iso 40 40 41 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) $(CFG)41 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) 42 42 mkdir -p $(TMP)/boot/grub 43 43 cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ … … 56 56 done 57 57 58 rm -f $(USPACEDIR)/dist/srv/*59 rm -f $(USPACEDIR)/dist/app/*60 rm -f $(USPACEDIR)/dist/cfg/net/*61 62 58 cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ 63 59 for task in $(INIT_TASKS) ; do \ … … 69 65 for file in $(RD_APPS) ; do \ 70 66 cp $$file $(USPACEDIR)/dist/app/ ; \ 71 done72 for file in $(NET_CFG) ; do \73 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \74 67 done 75 68 … … 85 78 86 79 clean: 87 rm -f $(USPACEDIR)/dist/srv/*88 rm -f $(USPACEDIR)/dist/app/*89 rm -f $(USPACEDIR)/dist/cfg/net/*90 91 80 for file in $(RD_SRVS) ; do \ 92 81 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 95 84 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 96 85 done 97 for file in $(NET_CFG) ; do \98 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \99 done100 86 rm -fr $(TMP) 101 87 rm -f $(BASE)/image.iso -
Property mode
changed from
-
boot/arch/arm32/loader/Makefile
rc2efbb4 rf516bc2 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/*40 rm -f $(USPACEDIR)/dist/app/*41 rm -f $(USPACEDIR)/dist/cfg/net/*42 43 39 for file in $(RD_SRVS) ; do \ 44 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 47 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 48 44 done 49 for file in $(NET_CFG) ; do \50 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \51 done52 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 53 46 find . -name '*.o' -follow -exec rm \{\} \; -
boot/arch/arm32/loader/Makefile.build
rc2efbb4 rf516bc2 76 76 77 77 $(DEPEND): 78 rm -f $(USPACEDIR)/dist/srv/*79 rm -f $(USPACEDIR)/dist/app/*80 rm -f $(USPACEDIR)/dist/cfg/net/*81 82 78 for file in $(RD_SRVS) ; do \ 83 79 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 85 81 for file in $(RD_APPS) ; do \ 86 82 cp $$file $(USPACEDIR)/dist/app/ ; \ 87 done88 for file in $(NET_CFG) ; do \89 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \90 83 done 91 84 ifeq ($(RDFMT),tmpfs) -
boot/arch/ia64/loader/Makefile
rc2efbb4 rf516bc2 40 40 $(MAKE) -C gefi clean 41 41 $(MAKE) -C gefi/HelenOS clean 42 43 rm -f $(USPACEDIR)/dist/srv/*44 rm -f $(USPACEDIR)/dist/app/*45 rm -f $(USPACEDIR)/dist/cfg/net/*46 47 42 for file in $(RD_SRVS) ; do \ 48 43 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 51 46 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 52 47 done 53 for file in $(NET_CFG) ; do \54 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \55 done56 48 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(HELLO) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 57 49 find . -name '*.o' -follow -exec rm \{\} \; -
boot/arch/ia64/loader/Makefile.build
rc2efbb4 rf516bc2 77 77 78 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/*80 rm -f $(USPACEDIR)/dist/app/*81 rm -f $(USPACEDIR)/dist/cfg/net/*82 83 79 for file in $(RD_SRVS) ; do \ 84 80 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 86 82 for file in $(RD_APPS) ; do \ 87 83 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done89 for file in $(NET_CFG) ; do \90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \91 84 done 92 85 ifeq ($(RDFMT),tmpfs) -
boot/arch/mips32/loader/Makefile
rc2efbb4 rf516bc2 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/*40 rm -f $(USPACEDIR)/dist/app/*41 rm -f $(USPACEDIR)/dist/cfg/net/*42 43 39 for file in $(RD_SRVS) ; do \ 44 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 47 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 48 44 done 49 for file in $(NET_CFG) ; do \50 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \51 done52 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(RAW) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 53 46 find . -name '*.o' -follow -exec rm \{\} \; -
boot/arch/mips32/loader/Makefile.build
rc2efbb4 rf516bc2 77 77 78 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/*80 rm -f $(USPACEDIR)/dist/app/*81 rm -f $(USPACEDIR)/dist/cfg/net/*82 83 79 for file in $(RD_SRVS) ; do \ 84 80 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 86 82 for file in $(RD_APPS) ; do \ 87 83 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done89 for file in $(NET_CFG) ; do \90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \91 84 done 92 85 ifeq ($(RDFMT),tmpfs) -
boot/arch/ppc32/loader/Makefile
rc2efbb4 rf516bc2 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/*40 rm -f $(USPACEDIR)/dist/app/*41 rm -f $(USPACEDIR)/dist/cfg/net/*42 43 39 for file in $(RD_SRVS) ; do \ 44 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 47 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 48 44 done 49 for file in $(NET_CFG) ; do \50 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \51 done52 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 53 46 find . -name '*.o' -follow -exec rm \{\} \; -
boot/arch/ppc32/loader/Makefile.build
rc2efbb4 rf516bc2 77 77 78 78 $(DEPEND): 79 rm -f $(USPACEDIR)/dist/srv/*80 rm -f $(USPACEDIR)/dist/app/*81 rm -f $(USPACEDIR)/dist/cfg/net/*82 83 79 for file in $(RD_SRVS) ; do \ 84 80 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 86 82 for file in $(RD_APPS) ; do \ 87 83 cp $$file $(USPACEDIR)/dist/app/ ; \ 88 done89 for file in $(NET_CFG) ; do \90 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \91 84 done 92 85 ifeq ($(RDFMT),tmpfs) -
boot/arch/sparc64/loader/Makefile
rc2efbb4 rf516bc2 37 37 38 38 clean: 39 rm -f $(USPACEDIR)/dist/srv/*40 rm -f $(USPACEDIR)/dist/app/*41 rm -f $(USPACEDIR)/dist/cfg/net/*42 43 39 for file in $(RD_SRVS) $(RD_SRVS_GENERIC) ; do \ 44 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ … … 47 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 48 44 done 49 for file in $(NET_CFG) ; do \50 rm -f $(USPACEDIR)/dist/cfg/net/`basename $$file` ; \51 done52 45 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 53 46 find . -name '*.o' -follow -exec rm \{\} \; -
boot/arch/sparc64/loader/Makefile.build
rc2efbb4 rf516bc2 88 88 89 89 $(DEPEND): 90 rm -f $(USPACEDIR)/dist/srv/*91 rm -f $(USPACEDIR)/dist/app/*92 rm -f $(USPACEDIR)/dist/cfg/net/*93 94 90 for file in $(RD_SRVS) ; do \ 95 91 cp $$file $(USPACEDIR)/dist/srv/ ; \ … … 97 93 for file in $(RD_APPS) ; do \ 98 94 cp $$file $(USPACEDIR)/dist/app/ ; \ 99 done100 for file in $(NET_CFG) ; do \101 cp $$file $(USPACEDIR)/dist/cfg/net/ ; \102 95 done 103 96 ifeq ($(RDFMT),tmpfs) -
defaults/amd64/Makefile.config
rc2efbb4 rf516bc2 61 61 # Mount /data on startup 62 62 CONFIG_MOUNT_DATA = n 63 64 # Default networking architecture65 NETWORKING = modular -
defaults/arm32/Makefile.config
rc2efbb4 rf516bc2 37 37 # Mount /data on startup 38 38 CONFIG_MOUNT_DATA = n 39 40 # Default networking architecture41 NETWORKING = none -
defaults/ia32/Makefile.config
rc2efbb4 rf516bc2 67 67 # Mount /data on startup 68 68 CONFIG_MOUNT_DATA = n 69 70 # Default networking architecture71 NETWORKING = modular -
defaults/ia64/Makefile.config
rc2efbb4 rf516bc2 49 49 # Mount /data on startup 50 50 CONFIG_MOUNT_DATA = n 51 52 # Default networking architecture53 NETWORKING = modular -
defaults/mips32/Makefile.config
rc2efbb4 rf516bc2 43 43 # Mount /data on startup 44 44 CONFIG_MOUNT_DATA = n 45 46 # Default networking architecture47 NETWORKING = none -
defaults/ppc32/Makefile.config
rc2efbb4 rf516bc2 43 43 # Mount /data on startup 44 44 CONFIG_MOUNT_DATA = n 45 46 # Default networking architecture47 NETWORKING = none -
defaults/sparc64/Makefile.config
rc2efbb4 rf516bc2 61 61 # Mount /data on startup 62 62 CONFIG_MOUNT_DATA = n 63 64 # Default networking architecture65 NETWORKING = modular -
defaults/sparc64/sun4v/Makefile.config
rc2efbb4 rf516bc2 12 12 13 13 CONFIG_FB = n 14 15 NETWORKING = none16 -
defaults/special/Makefile.config
rc2efbb4 rf516bc2 3 3 4 4 # Compiler 5 COMPILER = gcc_ cross5 COMPILER = gcc_native 6 6 7 7 # Support for SMP -
defaults/special/abs32le/Makefile.config
rc2efbb4 rf516bc2 1 1 # Platform 2 2 PLATFORM = abs32le 3 4 # Cross-compiler target5 CROSS_TARGET = ia326 7 # Networking architecture8 NETWORKING = none -
kernel/Makefile.build
rc2efbb4 rf516bc2 115 115 OBJCOPY = $(BINUTILS_PREFIX)objcopy 116 116 OBJDUMP = $(BINUTILS_PREFIX)objdump 117 LIBDIR = /usr/lib 117 118 CFLAGS = $(GCC_CFLAGS) 118 119 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) … … 126 127 OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy 127 128 OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump 129 LIBDIR = $(TOOLCHAIN_DIR)/lib 128 130 CFLAGS = $(GCC_CFLAGS) 129 131 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) … … 137 139 OBJCOPY = objcopy 138 140 OBJDUMP = objdump 141 LIBDIR = /usr/lib 139 142 CFLAGS = $(ICC_CFLAGS) 140 143 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) … … 148 151 OBJCOPY = $(BINUTILS_PREFIX)objcopy 149 152 OBJDUMP = $(BINUTILS_PREFIX)objdump 153 LIBDIR = /usr/lib 150 154 CFLAGS = $(SUNCC_CFLAGS) 151 155 DEFS += $(CONFIG_DEFS) … … 160 164 OBJCOPY = $(BINUTILS_PREFIX)objcopy 161 165 OBJDUMP = $(BINUTILS_PREFIX)objdump 166 LIBDIR = /usr/lib 162 167 CFLAGS = $(CLANG_CFLAGS) 163 168 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) -
kernel/arch/abs32le/Makefile.inc
rc2efbb4 rf516bc2 30 30 # 31 31 32 BFD = binary33 34 ifeq ($(COMPILER),gcc_cross)35 TOOLCHAIN_DIR = $(CROSS_PREFIX)/$(CROSS_TARGET)36 37 ifeq ($(CROSS_TARGET),arm32)38 TARGET = arm-linux-gnu39 ATSIGN = %40 endif41 42 ifeq ($(CROSS_TARGET),ia32)43 TARGET = i686-pc-linux-gnu44 endif45 46 ifeq ($(CROSS_TARGET),mips32)47 TARGET = mipsel-linux-gnu48 GCC_CFLAGS += -mno-abicalls49 endif50 endif51 52 32 BITS = 32 53 33 ENDIANESS = LE … … 63 43 arch/$(KARCH)/src/ddi/ddi.c \ 64 44 arch/$(KARCH)/src/smp/smp.c \ 65 arch/$(KARCH)/src/smp/ipi.c \66 45 arch/$(KARCH)/src/mm/as.c \ 67 46 arch/$(KARCH)/src/mm/frame.c \ -
kernel/arch/abs32le/include/asm.h
rc2efbb4 rf516bc2 40 40 #include <config.h> 41 41 42 static inline void asm_delay_loop(uint32_t usec) 43 { 44 } 42 extern void interrupt_handlers(void); 43 44 extern void enable_l_apic_in_msr(void); 45 46 47 extern void asm_delay_loop(uint32_t); 48 extern void asm_fake_loop(uint32_t); 49 45 50 46 51 static inline __attribute__((noreturn)) void cpu_halt(void) -
kernel/arch/abs32le/include/atomic.h
rc2efbb4 rf516bc2 54 54 } 55 55 56 static inline atomic_count_tatomic_postinc(atomic_t *val)56 static inline long atomic_postinc(atomic_t *val) 57 57 { 58 58 /* On real hardware both the storing of the previous … … 60 60 atomic action. */ 61 61 62 atomic_count_tprev = val->count;62 long prev = val->count; 63 63 64 64 val->count++; … … 66 66 } 67 67 68 static inline atomic_count_tatomic_postdec(atomic_t *val)68 static inline long atomic_postdec(atomic_t *val) 69 69 { 70 70 /* On real hardware both the storing of the previous … … 72 72 atomic action. */ 73 73 74 atomic_count_tprev = val->count;74 long prev = val->count; 75 75 76 76 val->count--; … … 81 81 #define atomic_predec(val) (atomic_postdec(val) - 1) 82 82 83 static inline atomic_count_t test_and_set(atomic_t *val) 84 { 85 atomic_count_t prev = val->count; 86 val->count = 1; 87 return prev; 83 static inline uint32_t test_and_set(atomic_t *val) { 84 uint32_t v; 85 86 asm volatile ( 87 "movl $1, %[v]\n" 88 "xchgl %[v], %[count]\n" 89 : [v] "=r" (v), [count] "+m" (val->count) 90 ); 91 92 return v; 88 93 } 89 94 95 /** ia32 specific fast spinlock */ 90 96 static inline void atomic_lock_arch(atomic_t *val) 91 97 { 92 do { 93 while (val->count); 94 } while (test_and_set(val)); 98 uint32_t tmp; 99 100 preemption_disable(); 101 asm volatile ( 102 "0:\n" 103 "pause\n" /* Pentium 4's HT love this instruction */ 104 "mov %[count], %[tmp]\n" 105 "testl %[tmp], %[tmp]\n" 106 "jnz 0b\n" /* lightweight looping on locked spinlock */ 107 108 "incl %[tmp]\n" /* now use the atomic operation */ 109 "xchgl %[count], %[tmp]\n" 110 "testl %[tmp], %[tmp]\n" 111 "jnz 0b\n" 112 : [count] "+m" (val->count), [tmp] "=&r" (tmp) 113 ); 114 /* 115 * Prevent critical section code from bleeding out this way up. 116 */ 117 CS_ENTER_BARRIER(); 95 118 } 96 119 -
kernel/arch/abs32le/include/barrier.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup abs32le29 /** @addtogroup ia32 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef KERN_abs32le_BARRIER_H_ 36 #define KERN_abs32le_BARRIER_H_ 35 #ifndef KERN_ia32_BARRIER_H_ 36 #define KERN_ia32_BARRIER_H_ 37 38 /* 39 * NOTE: 40 * No barriers for critical section (i.e. spinlock) on IA-32 are needed: 41 * - spinlock_lock() and spinlock_trylock() use serializing XCHG instruction 42 * - writes cannot pass reads on IA-32 => spinlock_unlock() needs no barriers 43 */ 37 44 38 45 /* … … 40 47 */ 41 48 42 #define CS_ENTER_BARRIER() 43 #define CS_LEAVE_BARRIER() 49 #define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") 50 #define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") 44 51 45 #define memory_barrier() 46 #define read_barrier() 47 #define write_barrier() 52 static inline void cpuid_serialization(void) 53 { 54 asm volatile ( 55 "xorl %%eax, %%eax\n" 56 "cpuid\n" 57 ::: "eax", "ebx", "ecx", "edx", "memory" 58 ); 59 } 48 60 49 #define smc_coherence(addr) 50 #define smc_coherence_block(addr, size) 61 #if defined(CONFIG_FENCES_P4) 62 #define memory_barrier() asm volatile ("mfence\n" ::: "memory") 63 #define read_barrier() asm volatile ("lfence\n" ::: "memory") 64 #ifdef CONFIG_WEAK_MEMORY 65 #define write_barrier() asm volatile ("sfence\n" ::: "memory") 66 #else 67 #define write_barrier() asm volatile ("" ::: "memory"); 68 #endif 69 #elif defined(CONFIG_FENCES_P3) 70 #define memory_barrier() cpuid_serialization() 71 #define read_barrier() cpuid_serialization() 72 #ifdef CONFIG_WEAK_MEMORY 73 #define write_barrier() asm volatile ("sfence\n" ::: "memory") 74 #else 75 #define write_barrier() asm volatile ("" ::: "memory"); 76 #endif 77 #else 78 #define memory_barrier() cpuid_serialization() 79 #define read_barrier() cpuid_serialization() 80 #ifdef CONFIG_WEAK_MEMORY 81 #define write_barrier() cpuid_serialization() 82 #else 83 #define write_barrier() asm volatile ("" ::: "memory"); 84 #endif 85 #endif 86 87 /* 88 * On ia32, the hardware takes care about instruction and data cache coherence, 89 * even on SMP systems. We issue a write barrier to be sure that writes 90 * queueing in the store buffer drain to the memory (even though it would be 91 * sufficient for them to drain to the D-cache). 92 */ 93 #define smc_coherence(a) write_barrier() 94 #define smc_coherence_block(a, l) write_barrier() 51 95 52 96 #endif -
kernel/arch/abs32le/include/context.h
rc2efbb4 rf516bc2 40 40 41 41 #define context_set(ctx, pc, stack, size) \ 42 context_set_generic(ctx, pc, stack, size)42 context_set_generic(ctx, pc, stack, size) 43 43 44 44 /* -
kernel/arch/abs32le/include/context_offset.h
rc2efbb4 rf516bc2 37 37 38 38 #define OFFSET_PC 0x00 39 #define OFFSET_IPL 0x04 39 40 #ifdef KERNEL 41 #define OFFSET_IPL 0x04 42 #else 43 #define OFFSET_TLS 0x04 44 #endif 40 45 41 46 #endif -
kernel/arch/abs32le/include/memstr.h
rc2efbb4 rf516bc2 36 36 #define KERN_abs32le_MEMSTR_H_ 37 37 38 #define memcpy(dst, src, cnt) _memcpy((dst), (src), (cnt)) 39 #define memsetb(dst, cnt, val) _memsetb((dst), (cnt), (val)) 40 #define memsetw(dst, cnt, val) _memsetw((dst), (cnt), (val)) 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 42 43 extern int memcmp(const void *, const void *, size_t); 41 44 42 45 #endif -
kernel/arch/abs32le/include/mm/frame.h
rc2efbb4 rf516bc2 40 40 41 41 #ifdef KERNEL 42 #ifndef __ASM__ 42 43 43 44 #include <arch/types.h> … … 46 47 extern void physmem_print(void); 47 48 49 #endif /* __ASM__ */ 48 50 #endif /* KERNEL */ 49 51 -
kernel/arch/abs32le/include/mm/page.h
rc2efbb4 rf516bc2 43 43 #ifdef KERNEL 44 44 45 #define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 46 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 45 #ifndef __ASM__ 46 #define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 47 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 48 #else 49 #define KA2PA(x) ((x) - 0x80000000) 50 #define PA2KA(x) ((x) + 0x80000000) 51 #endif 47 52 48 53 /* … … 117 122 #define PTE_EXECUTABLE_ARCH(p) 1 118 123 124 #ifndef __ASM__ 125 119 126 #include <mm/mm.h> 120 127 #include <arch/interrupt.h> … … 122 129 #include <typedefs.h> 123 130 131 /* Page fault error codes. */ 132 133 /** When bit on this position is 0, the page fault was caused by a not-present 134 * page. 135 */ 136 #define PFERR_CODE_P (1 << 0) 137 138 /** When bit on this position is 1, the page fault was caused by a write. */ 139 #define PFERR_CODE_RW (1 << 1) 140 141 /** When bit on this position is 1, the page fault was caused in user mode. */ 142 #define PFERR_CODE_US (1 << 2) 143 144 /** When bit on this position is 1, a reserved bit was set in page directory. */ 145 #define PFERR_CODE_RSVD (1 << 3) 146 124 147 /** Page Table Entry. */ 125 148 typedef struct { 126 unsigned int present : 1; 127 unsigned int writeable : 1; 128 unsigned int uaccessible : 1; 129 unsigned int page_write_through : 1; 130 unsigned int page_cache_disable : 1; 131 unsigned int accessed : 1; 132 unsigned int dirty : 1; 133 unsigned int pat : 1; 134 unsigned int global : 1; 135 136 /** Valid content even if the present bit is not set. */ 137 unsigned int soft_valid : 1; 138 unsigned int avl : 2; 139 unsigned int frame_address : 20; 140 } __attribute__((packed)) pte_t; 149 unsigned present : 1; 150 unsigned writeable : 1; 151 unsigned uaccessible : 1; 152 unsigned page_write_through : 1; 153 unsigned page_cache_disable : 1; 154 unsigned accessed : 1; 155 unsigned dirty : 1; 156 unsigned pat : 1; 157 unsigned global : 1; 158 unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */ 159 unsigned avl : 2; 160 unsigned frame_address : 20; 161 } __attribute__ ((packed)) pte_t; 141 162 142 163 static inline unsigned int get_pt_flags(pte_t *pt, size_t i) … … 171 192 172 193 extern void page_arch_init(void); 173 extern void page_fault(int, istate_t *); 194 extern void page_fault(int n, istate_t *istate); 195 196 #endif /* __ASM__ */ 174 197 175 198 #endif /* KERNEL */ -
kernel/arch/abs32le/include/types.h
rc2efbb4 rf516bc2 55 55 typedef uint32_t unative_t; 56 56 typedef int32_t native_t; 57 typedef uint32_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/arch/abs32le/src/abs32le.c
rc2efbb4 rf516bc2 35 35 #include <arch.h> 36 36 #include <arch/types.h> 37 #include <arch/context.h> 37 38 #include <arch/interrupt.h> 38 39 #include <arch/asm.h> … … 40 41 #include <func.h> 41 42 #include <config.h> 42 #include <errno.h>43 43 #include <context.h> 44 #include <fpu_context.h>45 44 #include <interrupt.h> 46 #include <syscall/copy.h>47 45 #include <ddi/irq.h> 48 46 #include <proc/thread.h> … … 51 49 #include <sysinfo/sysinfo.h> 52 50 #include <memstr.h> 53 54 char memcpy_from_uspace_failover_address;55 char memcpy_to_uspace_failover_address;56 51 57 52 void arch_pre_mm_init(void) … … 88 83 unative_t sys_tls_set(unative_t addr) 89 84 { 90 return EOK;85 return 0; 91 86 } 92 87 … … 114 109 } 115 110 111 void memsetb(void *dst, size_t cnt, uint8_t val) 112 { 113 _memsetb(dst, cnt, val); 114 } 115 116 void memsetw(void *dst, size_t cnt, uint16_t val) 117 { 118 _memsetw(dst, cnt, val); 119 } 120 116 121 void panic_printf(char *fmt, ...) 117 122 { … … 135 140 } 136 141 137 void fpu_init(void)138 {139 }140 141 void fpu_context_save(fpu_context_t *ctx)142 {143 }144 145 void fpu_context_restore(fpu_context_t *ctx)146 {147 }148 149 int memcpy_from_uspace(void *dst, const void *uspace_src, size_t size)150 {151 return EOK;152 }153 154 int memcpy_to_uspace(void *uspace_dst, const void *src, size_t size)155 {156 return EOK;157 }158 159 142 /** @} 160 143 */ -
kernel/arch/abs32le/src/debug/stacktrace.c
rc2efbb4 rf516bc2 40 40 bool kernel_frame_pointer_validate(uintptr_t fp) 41 41 { 42 return true; 42 return true;; 43 43 } 44 44 -
kernel/arch/amd64/include/atomic.h
rc2efbb4 rf516bc2 40 40 #include <preemption.h> 41 41 42 static inline void atomic_inc(atomic_t *val) 43 { 42 static inline void atomic_inc(atomic_t *val) { 44 43 #ifdef CONFIG_SMP 45 44 asm volatile ( … … 55 54 } 56 55 57 static inline void atomic_dec(atomic_t *val) 58 { 56 static inline void atomic_dec(atomic_t *val) { 59 57 #ifdef CONFIG_SMP 60 58 asm volatile ( … … 70 68 } 71 69 72 static inline atomic_count_t atomic_postinc(atomic_t *val)70 static inline long atomic_postinc(atomic_t *val) 73 71 { 74 atomic_count_tr = 1;72 long r = 1; 75 73 76 74 asm volatile ( 77 75 "lock xaddq %[r], %[count]\n" 78 : [count] "+m" (val->count), 79 [r] "+r" (r) 76 : [count] "+m" (val->count), [r] "+r" (r) 80 77 ); 81 78 … … 83 80 } 84 81 85 static inline atomic_count_t atomic_postdec(atomic_t *val)82 static inline long atomic_postdec(atomic_t *val) 86 83 { 87 atomic_count_tr = -1;84 long r = -1; 88 85 89 86 asm volatile ( 90 87 "lock xaddq %[r], %[count]\n" 91 : [count] "+m" (val->count), 92 [r] "+r" (r) 88 : [count] "+m" (val->count), [r] "+r" (r) 93 89 ); 94 90 … … 99 95 #define atomic_predec(val) (atomic_postdec(val) - 1) 100 96 101 static inline atomic_count_t test_and_set(atomic_t *val) 102 { 103 atomic_count_t v; 97 static inline uint64_t test_and_set(atomic_t *val) { 98 uint64_t v; 104 99 105 100 asm volatile ( 106 101 "movq $1, %[v]\n" 107 102 "xchgq %[v], %[count]\n" 108 : [v] "=r" (v), 109 [count] "+m" (val->count) 103 : [v] "=r" (v), [count] "+m" (val->count) 110 104 ); 111 105 … … 113 107 } 114 108 109 115 110 /** amd64 specific fast spinlock */ 116 111 static inline void atomic_lock_arch(atomic_t *val) 117 112 { 118 atomic_count_t tmp;113 uint64_t tmp; 119 114 120 115 preemption_disable(); … … 130 125 "testq %[tmp], %[tmp]\n" 131 126 "jnz 0b\n" 132 : [count] "+m" (val->count), 133 [tmp] "=&r" (tmp) 127 : [count] "+m" (val->count), [tmp] "=&r" (tmp) 134 128 ); 135 136 129 /* 137 130 * Prevent critical section code from bleeding out this way up. -
kernel/arch/amd64/include/interrupt.h
rc2efbb4 rf516bc2 54 54 #define IRQ_PIC_SPUR 7 55 55 #define IRQ_MOUSE 12 56 #define IRQ_DP8390 957 56 58 57 /* this one must have four least significant bits set to ones */ -
kernel/arch/amd64/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup amd64 29 /** @addtogroup amd64 30 30 * @{ 31 31 */ … … 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/amd64/include/types.h
rc2efbb4 rf516bc2 55 55 typedef uint64_t unative_t; 56 56 typedef int64_t native_t; 57 typedef uint64_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/arch/amd64/src/amd64.c
rc2efbb4 rf516bc2 228 228 (uintptr_t) I8042_BASE); 229 229 #endif 230 231 #ifdef CONFIG_NETIF_DP8390232 trap_virtual_enable_irqs(1 << IRQ_DP8390);233 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390);234 #endif235 230 } 236 231 -
kernel/arch/amd64/src/debugger.c
rc2efbb4 rf516bc2 201 201 202 202 /* Send IPI */ 203 #ifdef CONFIG_SMP 203 204 // ipi_broadcast(VECTOR_DEBUG_IPI); 205 #endif 204 206 205 207 return curidx; … … 260 262 spinlock_unlock(&bkpoint_lock); 261 263 interrupts_restore(ipl); 262 // ipi_broadcast(VECTOR_DEBUG_IPI); 264 #ifdef CONFIG_SMP 265 // ipi_broadcast(VECTOR_DEBUG_IPI); 266 #endif 263 267 } 264 268 -
kernel/arch/arm32/include/atomic.h
rc2efbb4 rf516bc2 47 47 * 48 48 */ 49 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)49 static inline long atomic_add(atomic_t *val, int i) 50 50 { 51 long ret; 52 51 53 /* 52 54 * This implementation is for UP pre-ARMv6 systems where we do not have … … 55 57 ipl_t ipl = interrupts_disable(); 56 58 val->count += i; 57 atomic_count_tret = val->count;59 ret = val->count; 58 60 interrupts_restore(ipl); 59 61 … … 64 66 * 65 67 * @param val Variable to be incremented. 66 *67 68 */ 68 69 static inline void atomic_inc(atomic_t *val) … … 74 75 * 75 76 * @param val Variable to be decremented. 76 *77 77 */ 78 78 static inline void atomic_dec(atomic_t *val) { … … 84 84 * @param val Variable to be incremented. 85 85 * @return Value after incrementation. 86 *87 86 */ 88 static inline atomic_count_tatomic_preinc(atomic_t *val)87 static inline long atomic_preinc(atomic_t *val) 89 88 { 90 89 return atomic_add(val, 1); … … 95 94 * @param val Variable to be decremented. 96 95 * @return Value after decrementation. 97 *98 96 */ 99 static inline atomic_count_tatomic_predec(atomic_t *val)97 static inline long atomic_predec(atomic_t *val) 100 98 { 101 99 return atomic_add(val, -1); … … 106 104 * @param val Variable to be incremented. 107 105 * @return Value before incrementation. 108 *109 106 */ 110 static inline atomic_count_tatomic_postinc(atomic_t *val)107 static inline long atomic_postinc(atomic_t *val) 111 108 { 112 109 return atomic_add(val, 1) - 1; … … 117 114 * @param val Variable to be decremented. 118 115 * @return Value before decrementation. 119 *120 116 */ 121 static inline atomic_count_tatomic_postdec(atomic_t *val)117 static inline long atomic_postdec(atomic_t *val) 122 118 { 123 119 return atomic_add(val, -1) + 1; -
kernel/arch/arm32/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup arm32 29 /** @addtogroup arm32 30 30 * @{ 31 31 */ … … 39 39 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 40 40 41 extern void memsetw(void *, size_t, uint16_t); 42 extern void memsetb(void *, size_t, uint8_t); 41 extern void memsetw(void *dst, size_t cnt, uint16_t x); 42 extern void memsetb(void *dst, size_t cnt, uint8_t x); 43 44 extern int memcmp(const void *a, const void *b, size_t cnt); 43 45 44 46 #endif -
kernel/arch/arm32/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup arm32 29 /** @addtogroup arm32 30 30 * @{ 31 31 */ … … 38 38 39 39 #ifndef DOXYGEN 40 #define ATTRIBUTE_PACKED __attribute__((packed))40 # define ATTRIBUTE_PACKED __attribute__ ((packed)) 41 41 #else 42 #define ATTRIBUTE_PACKED42 # define ATTRIBUTE_PACKED 43 43 #endif 44 44 … … 62 62 typedef uint32_t unative_t; 63 63 typedef int32_t native_t; 64 typedef uint32_t atomic_count_t;65 64 66 65 typedef struct { -
kernel/arch/ia32/include/atomic.h
rc2efbb4 rf516bc2 40 40 #include <preemption.h> 41 41 42 static inline void atomic_inc(atomic_t *val) 43 { 42 static inline void atomic_inc(atomic_t *val) { 44 43 #ifdef CONFIG_SMP 45 44 asm volatile ( … … 55 54 } 56 55 57 static inline void atomic_dec(atomic_t *val) 58 { 56 static inline void atomic_dec(atomic_t *val) { 59 57 #ifdef CONFIG_SMP 60 58 asm volatile ( … … 70 68 } 71 69 72 static inline atomic_count_t atomic_postinc(atomic_t *val)70 static inline long atomic_postinc(atomic_t *val) 73 71 { 74 atomic_count_tr = 1;72 long r = 1; 75 73 76 74 asm volatile ( 77 75 "lock xaddl %[r], %[count]\n" 78 : [count] "+m" (val->count), 79 [r] "+r" (r) 76 : [count] "+m" (val->count), [r] "+r" (r) 80 77 ); 81 78 … … 83 80 } 84 81 85 static inline atomic_count_t atomic_postdec(atomic_t *val)82 static inline long atomic_postdec(atomic_t *val) 86 83 { 87 atomic_count_tr = -1;84 long r = -1; 88 85 89 86 asm volatile ( 90 87 "lock xaddl %[r], %[count]\n" 91 : [count] "+m" (val->count), 92 [r] "+r" (r) 88 : [count] "+m" (val->count), [r] "+r"(r) 93 89 ); 94 90 … … 99 95 #define atomic_predec(val) (atomic_postdec(val) - 1) 100 96 101 static inline atomic_count_t test_and_set(atomic_t *val) 102 { 103 atomic_count_t v; 97 static inline uint32_t test_and_set(atomic_t *val) { 98 uint32_t v; 104 99 105 100 asm volatile ( 106 101 "movl $1, %[v]\n" 107 102 "xchgl %[v], %[count]\n" 108 : [v] "=r" (v), 109 [count] "+m" (val->count) 103 : [v] "=r" (v), [count] "+m" (val->count) 110 104 ); 111 105 … … 116 110 static inline void atomic_lock_arch(atomic_t *val) 117 111 { 118 atomic_count_t tmp;112 uint32_t tmp; 119 113 120 114 preemption_disable(); … … 130 124 "testl %[tmp], %[tmp]\n" 131 125 "jnz 0b\n" 132 : [count] "+m" (val->count), 133 [tmp] "=&r" (tmp) 126 : [count] "+m" (val->count), [tmp] "=&r" (tmp) 134 127 ); 135 136 128 /* 137 129 * Prevent critical section code from bleeding out this way up. -
kernel/arch/ia32/include/interrupt.h
rc2efbb4 rf516bc2 54 54 #define IRQ_PIC_SPUR 7 55 55 #define IRQ_MOUSE 12 56 #define IRQ_DP8390 957 56 58 57 /* this one must have four least significant bits set to ones */ -
kernel/arch/ia32/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ … … 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/ia32/include/types.h
rc2efbb4 rf516bc2 55 55 typedef uint32_t unative_t; 56 56 typedef int32_t native_t; 57 typedef uint32_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/arch/ia32/src/ia32.c
rc2efbb4 rf516bc2 186 186 (uintptr_t) I8042_BASE); 187 187 #endif 188 189 #ifdef CONFIG_NETIF_DP8390190 trap_virtual_enable_irqs(1 << IRQ_DP8390);191 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390);192 #endif193 188 } 194 189 -
kernel/arch/ia32/src/smp/ipi.c
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ -
kernel/arch/ia64/include/atomic.h
rc2efbb4 rf516bc2 36 36 #define KERN_ia64_ATOMIC_H_ 37 37 38 static inline atomic_count_t test_and_set(atomic_t *val)38 static inline uint64_t test_and_set(atomic_t *val) 39 39 { 40 atomic_count_t v;41 40 uint64_t v; 41 42 42 asm volatile ( 43 43 "movl %[v] = 0x1;;\n" … … 53 53 { 54 54 do { 55 while (val->count); 55 while (val->count) 56 ; 56 57 } while (test_and_set(val)); 57 58 } … … 59 60 static inline void atomic_inc(atomic_t *val) 60 61 { 61 atomic_count_tv;62 long v; 62 63 63 64 asm volatile ( … … 70 71 static inline void atomic_dec(atomic_t *val) 71 72 { 72 atomic_count_tv;73 long v; 73 74 74 75 asm volatile ( … … 79 80 } 80 81 81 static inline atomic_count_tatomic_preinc(atomic_t *val)82 static inline long atomic_preinc(atomic_t *val) 82 83 { 83 atomic_count_tv;84 long v; 84 85 85 86 asm volatile ( … … 92 93 } 93 94 94 static inline atomic_count_tatomic_predec(atomic_t *val)95 static inline long atomic_predec(atomic_t *val) 95 96 { 96 atomic_count_tv;97 long v; 97 98 98 99 asm volatile ( … … 105 106 } 106 107 107 static inline atomic_count_tatomic_postinc(atomic_t *val)108 static inline long atomic_postinc(atomic_t *val) 108 109 { 109 atomic_count_tv;110 long v; 110 111 111 112 asm volatile ( … … 118 119 } 119 120 120 static inline atomic_count_tatomic_postdec(atomic_t *val)121 static inline long atomic_postdec(atomic_t *val) 121 122 { 122 atomic_count_tv;123 long v; 123 124 124 125 asm volatile ( -
kernel/arch/ia64/include/interrupt.h
rc2efbb4 rf516bc2 61 61 #define IRQ_KBD (0x01 + LEGACY_INTERRUPT_BASE) 62 62 #define IRQ_MOUSE (0x0c + LEGACY_INTERRUPT_BASE) 63 #define IRQ_DP8390 (0x09 + LEGACY_INTERRUPT_BASE)64 63 65 64 /** General Exception codes. */ -
kernel/arch/ia64/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/ia64/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 63 63 typedef uint64_t unative_t; 64 64 typedef int64_t native_t; 65 typedef uint64_t atomic_count_t;66 65 67 66 typedef struct { -
kernel/arch/ia64/src/ia64.c
rc2efbb4 rf516bc2 212 212 (uintptr_t) I8042_BASE); 213 213 #endif 214 215 #ifdef CONFIG_NETIF_DP8390 216 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390); 217 #endif 218 214 219 215 sysinfo_set_item_val("ia64_iospace", NULL, true); 220 216 sysinfo_set_item_val("ia64_iospace.address", NULL, true); -
kernel/arch/mips32/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 51 51 * 52 52 * @return Value after addition. 53 *54 53 */ 55 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)54 static inline long atomic_add(atomic_t *val, int i) 56 55 { 57 atomic_count_t tmp; 58 atomic_count_t v; 56 long tmp, v; 59 57 60 58 asm volatile ( … … 66 64 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ 67 65 " nop\n" 68 : "=&r" (tmp), 69 "+m" (val->count), 70 "=&r" (v) 71 : "r" (i), 72 "i" (0) 66 : "=&r" (tmp), "+m" (val->count), "=&r" (v) 67 : "r" (i), "i" (0) 73 68 ); 74 69 … … 76 71 } 77 72 78 static inline atomic_count_t test_and_set(atomic_t *val) 79 { 80 atomic_count_t tmp; 81 atomic_count_t v; 73 static inline uint32_t test_and_set(atomic_t *val) { 74 uint32_t tmp, v; 82 75 83 76 asm volatile ( … … 89 82 " beqz %0, 1b\n" 90 83 "2:\n" 91 : "=&r" (tmp), 92 "+m" (val->count), 93 "=&r" (v) 84 : "=&r" (tmp), "+m" (val->count), "=&r" (v) 94 85 : "i" (1) 95 86 ); … … 98 89 } 99 90 100 static inline void atomic_lock_arch(atomic_t *val) 101 { 91 static inline void atomic_lock_arch(atomic_t *val) { 102 92 do { 103 while (val->count); 93 while (val->count) 94 ; 104 95 } while (test_and_set(val)); 105 96 } -
kernel/arch/mips32/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/mips32/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 55 55 typedef uint32_t unative_t; 56 56 typedef int32_t native_t; 57 typedef uint32_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/arch/mips32/src/smp/dorder.c
rc2efbb4 rf516bc2 33 33 */ 34 34 35 #include <smp/ipi.h> 36 37 #ifdef CONFIG_SMP 35 #include <arch/smp/dorder.h> 38 36 39 37 #define MSIM_DORDER_ADDRESS 0xB0000004 … … 41 39 void ipi_broadcast_arch(int ipi) 42 40 { 41 #ifdef CONFIG_SMP 43 42 *((volatile unsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF; 43 #endif 44 44 } 45 46 #endif47 45 48 46 /** @} -
kernel/arch/ppc32/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 38 38 static inline void atomic_inc(atomic_t *val) 39 39 { 40 atomic_count_ttmp;41 40 long tmp; 41 42 42 asm volatile ( 43 43 "1:\n" … … 46 46 "stwcx. %0, 0, %2\n" 47 47 "bne- 1b" 48 : "=&r" (tmp), 49 "=m" (val->count) 50 : "r" (&val->count), 51 "m" (val->count) 48 : "=&r" (tmp), "=m" (val->count) 49 : "r" (&val->count), "m" (val->count) 52 50 : "cc" 53 51 ); … … 56 54 static inline void atomic_dec(atomic_t *val) 57 55 { 58 atomic_count_ttmp;59 56 long tmp; 57 60 58 asm volatile ( 61 59 "1:\n" 62 60 "lwarx %0, 0, %2\n" 63 61 "addic %0, %0, -1\n" 64 "stwcx. %0, 0, %2\n"62 "stwcx. %0, 0, %2\n" 65 63 "bne- 1b" 66 : "=&r" (tmp), 67 "=m" (val->count) 68 : "r" (&val->count), 69 "m" (val->count) 64 : "=&r" (tmp), "=m" (val->count) 65 : "r" (&val->count), "m" (val->count) 70 66 : "cc" 71 67 ); 72 68 } 73 69 74 static inline atomic_count_tatomic_postinc(atomic_t *val)70 static inline long atomic_postinc(atomic_t *val) 75 71 { 76 72 atomic_inc(val); … … 78 74 } 79 75 80 static inline atomic_count_tatomic_postdec(atomic_t *val)76 static inline long atomic_postdec(atomic_t *val) 81 77 { 82 78 atomic_dec(val); … … 84 80 } 85 81 86 static inline atomic_count_tatomic_preinc(atomic_t *val)82 static inline long atomic_preinc(atomic_t *val) 87 83 { 88 84 atomic_inc(val); … … 90 86 } 91 87 92 static inline atomic_count_tatomic_predec(atomic_t *val)88 static inline long atomic_predec(atomic_t *val) 93 89 { 94 90 atomic_dec(val); -
kernel/arch/ppc32/include/memstr.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/ppc32/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 55 55 typedef uint32_t unative_t; 56 56 typedef int32_t native_t; 57 typedef uint32_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/arch/sparc64/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 45 45 * 46 46 * @param val Atomic variable. 47 * @param i Signed value to be added.47 * @param i Signed value to be added. 48 48 * 49 49 * @return Value of the atomic variable as it existed before addition. 50 *51 50 */ 52 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)51 static inline long atomic_add(atomic_t *val, int i) 53 52 { 54 atomic_count_t a; 55 atomic_count_t b; 56 53 uint64_t a, b; 54 57 55 do { 58 volatile uintptr_t ptr = (uintptr_t) &val->count;59 60 a = *(( atomic_count_t *) ptr);56 volatile uintptr_t x = (uint64_t) &val->count; 57 58 a = *((uint64_t *) x); 61 59 b = a + i; 62 63 asm volatile ( 64 "casx %0, %2, %1\n" 65 : "+m" (*((atomic_count_t *) ptr)), 66 "+r" (b) 67 : "r" (a) 68 ); 60 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), 61 "+r" (b) : "r" (a)); 69 62 } while (a != b); 70 63 71 64 return a; 72 65 } 73 66 74 static inline atomic_count_tatomic_preinc(atomic_t *val)67 static inline long atomic_preinc(atomic_t *val) 75 68 { 76 69 return atomic_add(val, 1) + 1; 77 70 } 78 71 79 static inline atomic_count_tatomic_postinc(atomic_t *val)72 static inline long atomic_postinc(atomic_t *val) 80 73 { 81 74 return atomic_add(val, 1); 82 75 } 83 76 84 static inline atomic_count_tatomic_predec(atomic_t *val)77 static inline long atomic_predec(atomic_t *val) 85 78 { 86 79 return atomic_add(val, -1) - 1; 87 80 } 88 81 89 static inline atomic_count_tatomic_postdec(atomic_t *val)82 static inline long atomic_postdec(atomic_t *val) 90 83 { 91 84 return atomic_add(val, -1); … … 102 95 } 103 96 104 static inline atomic_count_ttest_and_set(atomic_t *val)97 static inline long test_and_set(atomic_t *val) 105 98 { 106 atomic_count_t v = 1; 107 volatile uintptr_t ptr = (uintptr_t) &val->count; 108 109 asm volatile ( 110 "casx %0, %2, %1\n" 111 : "+m" (*((atomic_count_t *) ptr)), 112 "+r" (v) 113 : "r" (0) 114 ); 115 99 uint64_t v = 1; 100 volatile uintptr_t x = (uint64_t) &val->count; 101 102 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), 103 "+r" (v) : "r" (0)); 104 116 105 return v; 117 106 } … … 119 108 static inline void atomic_lock_arch(atomic_t *val) 120 109 { 121 atomic_count_t tmp1 = 1;122 atomic_count_t tmp2 = 0;123 124 volatile uintptr_t ptr = (uintptr_t) &val->count;125 110 uint64_t tmp1 = 1; 111 uint64_t tmp2 = 0; 112 113 volatile uintptr_t x = (uint64_t) &val->count; 114 126 115 preemption_disable(); 127 116 128 117 asm volatile ( 129 "0:\n" 130 "casx %0, %3, %1\n" 131 "brz %1, 2f\n" 132 "nop\n" 133 "1:\n" 134 "ldx %0, %2\n" 135 "brz %2, 0b\n" 136 "nop\n" 137 "ba %%xcc, 1b\n" 138 "nop\n" 139 "2:\n" 140 : "+m" (*((atomic_count_t *) ptr)), 141 "+r" (tmp1), 142 "+r" (tmp2) 143 : "r" (0) 118 "0:\n" 119 "casx %0, %3, %1\n" 120 "brz %1, 2f\n" 121 "nop\n" 122 "1:\n" 123 "ldx %0, %2\n" 124 "brz %2, 0b\n" 125 "nop\n" 126 "ba %%xcc, 1b\n" 127 "nop\n" 128 "2:\n" 129 : "+m" (*((uint64_t *) x)), "+r" (tmp1), "+r" (tmp2) : "r" (0) 144 130 ); 145 131 -
kernel/arch/sparc64/include/memstr.h
rc2efbb4 rf516bc2 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 40 extern void memsetw(void *dst, size_t cnt, uint16_t x); 41 extern void memsetb(void *dst, size_t cnt, uint8_t x); 42 43 extern int memcmp(const void *a, const void *b, size_t cnt); 42 44 43 45 #endif -
kernel/arch/sparc64/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 55 55 typedef uint64_t unative_t; 56 56 typedef int64_t native_t; 57 typedef uint64_t atomic_count_t;58 57 59 58 typedef struct { -
kernel/genarch/include/softint/division.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup genarch 29 /** @addtogroup genarch 30 30 * @{ 31 31 */ -
kernel/generic/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ATOMIC_H_ 37 37 38 #include <arch/types.h>39 40 38 typedef struct atomic { 41 volatile atomic_count_tcount;39 volatile long count; 42 40 } atomic_t; 43 41 44 42 #include <arch/atomic.h> 45 43 46 static inline void atomic_set(atomic_t *val, atomic_count_ti)44 static inline void atomic_set(atomic_t *val, long i) 47 45 { 48 46 val->count = i; 49 47 } 50 48 51 static inline atomic_count_tatomic_get(atomic_t *val)49 static inline long atomic_get(atomic_t *val) 52 50 { 53 51 return val->count; -
kernel/generic/include/console/console.h
rc2efbb4 rf516bc2 41 41 extern indev_t *stdin; 42 42 extern outdev_t *stdout; 43 extern bool silent; 43 44 44 45 extern indev_t *stdin_wire(void); -
kernel/generic/include/ipc/ipc.h
rc2efbb4 rf516bc2 227 227 #ifdef KERNEL 228 228 229 #define IPC_MAX_PHONES 32229 #define IPC_MAX_PHONES 16 230 230 231 231 #include <synch/spinlock.h> -
kernel/generic/include/panic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_PANIC_H_ 37 37 38 #include <typedefs.h>39 38 #include <stacktrace.h> 40 39 #include <print.h> … … 43 42 # define panic(format, ...) \ 44 43 do { \ 45 silent = false; \46 44 printf("Kernel panic in %s() at %s:%u.\n", \ 47 45 __func__, __FILE__, __LINE__); \ … … 52 50 #else 53 51 # define panic(format, ...) \ 54 do { \ 55 silent = false; \ 56 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \ 57 } while (0) 52 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); 58 53 #endif 59 60 extern bool silent;61 54 62 55 extern void panic_printf(char *fmt, ...) __attribute__((noreturn)); -
kernel/generic/include/smp/ipi.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 37 37 38 38 #ifdef CONFIG_SMP 39 40 extern void ipi_broadcast(int); 41 extern void ipi_broadcast_arch(int); 42 39 extern void ipi_broadcast(int ipi); 40 extern void ipi_broadcast_arch(int ipi); 43 41 #else 44 45 #define ipi_broadcast(ipi) 46 42 #define ipi_broadcast(x) ; 47 43 #endif /* CONFIG_SMP */ 48 44 -
kernel/generic/src/console/console.c
rc2efbb4 rf516bc2 45 45 #include <ipc/irq.h> 46 46 #include <arch.h> 47 #include <panic.h>48 47 #include <print.h> 49 48 #include <putchar.h> -
kernel/generic/src/ddi/ddi.c
rc2efbb4 rf516bc2 146 146 (btree_key_t) pf, &nodep); 147 147 148 if ((!parea) || (parea->frames < pages)) { 149 spinlock_unlock(&parea_lock); 148 if ((!parea) || (parea->frames < pages)) 150 149 goto err; 151 }152 150 153 151 spinlock_unlock(&parea_lock); … … 155 153 } 156 154 155 err: 157 156 spinlock_unlock(&zones.lock); 158 err:159 157 interrupts_restore(ipl); 160 158 return ENOENT; -
kernel/generic/src/proc/scheduler.c
rc2efbb4 rf516bc2 542 542 { 543 543 thread_t *t; 544 int count; 545 atomic_count_t average; 544 int count, average, j, k = 0; 546 545 unsigned int i; 547 int j;548 int k = 0;549 546 ipl_t ipl; 550 547 -
kernel/generic/src/smp/ipi.c
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 33 33 /** 34 34 * @file 35 * @brief Generic IPI interface.35 * @brief Generic IPI interface. 36 36 */ 37 37 38 38 #ifdef CONFIG_SMP 39 39 40 40 #include <smp/ipi.h> 41 41 #include <config.h> 42 42 43 43 44 /** Broadcast IPI message … … 48 49 * 49 50 * @bug The decision whether to actually send the IPI must be based 50 * on a different criterion. The current version has51 * problems when some of the detected CPUs are marked52 * disabled in machine configuration.51 * on a different criterion. The current version has 52 * problems when some of the detected CPUs are marked 53 * disabled in machine configuration. 53 54 */ 54 55 void ipi_broadcast(int ipi) … … 59 60 * - if there is only one CPU but the kernel was compiled with CONFIG_SMP 60 61 */ 61 62 62 63 if ((config.cpu_active > 1) && (config.cpu_active == config.cpu_count)) 63 64 ipi_broadcast_arch(ipi); -
kernel/test/fpu/fpu1_ia64.c
rc2efbb4 rf516bc2 128 128 char *test_fpu1(void) 129 129 { 130 unsigned int i; 131 atomic_count_t total = 0; 130 unsigned int i, total = 0; 132 131 133 132 waitq_initialize(&can_start); … … 160 159 waitq_wakeup(&can_start, WAKEUP_ALL); 161 160 162 while (atomic_get(&threads_ok) != total) {161 while (atomic_get(&threads_ok) != (long) total) { 163 162 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 164 163 thread_sleep(1); -
kernel/test/fpu/fpu1_x86.c
rc2efbb4 rf516bc2 125 125 char *test_fpu1(void) 126 126 { 127 unsigned int i; 128 atomic_count_t total = 0; 127 unsigned int i, total = 0; 129 128 130 129 waitq_initialize(&can_start); … … 157 156 waitq_wakeup(&can_start, WAKEUP_ALL); 158 157 159 while (atomic_get(&threads_ok) != total) {158 while (atomic_get(&threads_ok) != (long) total) { 160 159 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 161 160 thread_sleep(1); -
kernel/test/fpu/mips2.c
rc2efbb4 rf516bc2 111 111 char *test_mips2(void) 112 112 { 113 unsigned int i; 114 atomic_count_t total = 0; 113 unsigned int i, total = 0; 115 114 116 115 waitq_initialize(&can_start); … … 139 138 140 139 TPRINTF("ok\n"); 141 140 142 141 thread_sleep(1); 143 142 waitq_wakeup(&can_start, WAKEUP_ALL); 144 143 145 while (atomic_get(&threads_ok) != total) {144 while (atomic_get(&threads_ok) != (long) total) { 146 145 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 147 146 thread_sleep(1); -
kernel/test/fpu/sse1.c
rc2efbb4 rf516bc2 109 109 char *test_sse1(void) 110 110 { 111 unsigned int i; 112 atomic_count_t total = 0; 111 unsigned int i, total = 0; 113 112 114 113 waitq_initialize(&can_start); … … 141 140 waitq_wakeup(&can_start, WAKEUP_ALL); 142 141 143 while (atomic_get(&threads_ok) != total) {142 while (atomic_get(&threads_ok) != (long) total) { 144 143 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 145 144 thread_sleep(1); -
kernel/test/synch/rwlock5.c
rc2efbb4 rf516bc2 70 70 { 71 71 int i, j, k; 72 atomic_count_t readers; 73 atomic_count_t writers; 72 long readers, writers; 74 73 75 74 waitq_initialize(&can_start); -
kernel/test/synch/semaphore1.c
rc2efbb4 rf516bc2 73 73 { 74 74 int i, j, k; 75 atomic_count_t consumers; 76 atomic_count_t producers; 75 int consumers, producers; 77 76 78 77 waitq_initialize(&can_start); -
kernel/test/thread/thread1.c
rc2efbb4 rf516bc2 55 55 char *test_thread1(void) 56 56 { 57 unsigned int i; 58 atomic_count_t total = 0; 57 unsigned int i, total = 0; 59 58 60 59 atomic_set(&finish, 1); 61 60 atomic_set(&threads_finished, 0); 62 61 63 for (i = 0; i < THREADS; i++) { 62 for (i = 0; i < THREADS; i++) { 64 63 thread_t *t; 65 64 if (!(t = thread_create(threadtest, NULL, TASK, 0, "threadtest", false))) { … … 75 74 76 75 atomic_set(&finish, 0); 77 while (atomic_get(&threads_finished) < total) {76 while (atomic_get(&threads_finished) < ((long) total)) { 78 77 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_finished)); 79 78 thread_sleep(1); -
uspace/Makefile
rc2efbb4 rf516bc2 60 60 srv/fs/devfs \ 61 61 srv/hid/adb_mouse \ 62 srv/hid/console \ 62 63 srv/hid/char_mouse \ 63 64 srv/hid/fb \ 64 65 srv/hid/kbd \ 65 srv/hw/char/i8042 \ 66 srv/net 67 68 ifneq ($(UARCH),abs32le) 69 DIRS += srv/hid/console 70 endif 66 srv/hw/char/i8042 71 67 72 68 ifeq ($(UARCH),amd64) -
uspace/app/tester/thread/thread1.c
rc2efbb4 rf516bc2 53 53 { 54 54 unsigned int i; 55 atomic_count_t total = 0;55 int total = 0; 56 56 57 57 atomic_set(&finish, 1); -
uspace/doc/doxygroups.h
rc2efbb4 rf516bc2 26 26 * @ingroup srvcs 27 27 */ 28 29 /** 30 * @defgroup net Networking Stack 31 * @ingroup srvcs 32 */ 33 34 /** 35 * @defgroup netif Network interface drivers 36 * @ingroup net 37 */ 38 39 /** 40 * @defgroup lo Loopback Service 41 * @ingroup netif 42 */ 43 44 /** 45 * @defgroup dp8390 Generic DP8390 network interface family service 46 * @ingroup netif 47 */ 48 49 /** 50 * @defgroup ne2k NE2000 network interface family 51 * @ingroup dp8390 52 */ 53 54 /** 55 * @defgroup net_nil Network interface layer 56 * @ingroup net 57 */ 58 59 /** 60 * @defgroup eth Ethernet (IEEE 802.3) network interface layer Service 61 * @ingroup net_nil 62 */ 63 64 /** 65 * @defgroup nildummy Dummy network interface layer Service 66 * @ingroup net_nil 67 */ 68 69 /** 70 * @defgroup net_il Inter-networking layer 71 * @ingroup net 72 */ 73 74 /** 75 * @defgroup arp Address Resolution Protocol (ARP) Service 76 * @ingroup net_il 77 */ 78 79 /** 80 * @defgroup ip Internet Protocol (IP) Service 81 * @ingroup net_il 82 */ 83 84 /** 85 * @defgroup net_tl Transport layer 86 * @ingroup net 87 */ 88 89 /** 90 * @defgroup icmp Internet Control Message Protocol (ICMP) Service 91 * @ingroup net_tl 92 */ 93 94 /** 95 * @defgroup udp User Datagram Protocol (UDP) Service 96 * @ingroup net_tl 97 */ 98 99 /** 100 * @defgroup tcp Transmission Control Protocol (TCP) Service 101 * @ingroup net_tl 102 */ 103 104 /** 105 * @defgroup packet Packet management system 106 * @ingroup net 107 */ 108 109 /** 110 * @defgroup net_app Applications 111 * @ingroup net 112 */ 113 114 /** 115 * @defgroup echo Echo Service 116 * @ingroup net_app 117 */ 118 119 /** 120 * @defgroup ping Ping 121 * @ingroup net_app 122 */ 123 124 /** 125 * @defgroup nettest Networking tests 126 * @ingroup net_app 127 */ 128 129 /** 130 * @defgroup net_lib Application library 131 * @ingroup net 132 */ 133 134 /** 135 * @defgroup socket Sockets 136 * @ingroup net_lib 137 */ 138 139 /** 140 * @defgroup netdb Netdb 141 * @ingroup net_lib 142 */ 143 28 144 29 /** 145 30 * @cond amd64 -
uspace/lib/Makefile.common
rc2efbb4 rf516bc2 33 33 # Individual makefiles set: 34 34 # 35 # USPACE_PREFIXrelative path to uspace/ directory36 # LIBSlibraries to link with (with relative path)37 # EXTRA_CFLAGSadditional flags to pass to C compiler38 # JOBjob file name (like appname.job)39 # OUTPUToutput binary name (like appname)40 # SOURCESlist of source files35 # USPACE_PREFIX relative path to uspace/ directory 36 # LIBS libraries to link with (with relative path) 37 # EXTRA_CFLAGS additional flags to pass to C compiler 38 # JOB job file name (like appname.job) 39 # OUTPUT output binary name (like appname) 40 # SOURCES list of source files 41 41 # 42 42 … … 72 72 find . -name '*.o' -follow -exec rm \{\} \; 73 73 74 build: 74 build: 75 75 76 76 -include $(DEPEND) -
uspace/lib/libc/Makefile
rc2efbb4 rf516bc2 31 31 32 32 USPACE_PREFIX = $(shell pwd)/../.. 33 #LIBS = $(LIBC_PREFIX)/libc.a 33 34 LIBS = 34 35 … … 90 91 generic/stacktrace.c 91 92 93 ARCH_SOURCES = \ 94 arch/$(UARCH)/src/entry.s \ 95 arch/$(UARCH)/src/thread_entry.s 96 92 97 SOURCES = \ 93 98 $(GENERIC_SOURCES) \ -
uspace/lib/libc/arch/amd64/Makefile.inc
rc2efbb4 rf516bc2 34 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/amd64/bin 35 35 36 ARCH_SOURCES = \ 37 arch/$(UARCH)/src/entry.s \ 38 arch/$(UARCH)/src/thread_entry.s \ 39 arch/$(UARCH)/src/syscall.S \ 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ 40 37 arch/$(UARCH)/src/fibril.S \ 41 38 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/amd64/include/atomic.h
rc2efbb4 rf516bc2 42 42 #include <atomicdflt.h> 43 43 44 static inline void atomic_inc(atomic_t *val) 45 { 46 asm volatile ( 47 "lock incq %[count]\n" 48 : [count] "+m" (val->count) 49 ); 44 static inline void atomic_inc(atomic_t *val) { 45 asm volatile ("lock incq %0\n" : "+m" (val->count)); 50 46 } 51 47 52 static inline void atomic_dec(atomic_t *val) 53 { 54 asm volatile ( 55 "lock decq %[count]\n" 56 : [count] "+m" (val->count) 57 ); 48 static inline void atomic_dec(atomic_t *val) { 49 asm volatile ("lock decq %0\n" : "+m" (val->count)); 58 50 } 59 51 60 static inline atomic_count_t atomic_postinc(atomic_t *val)52 static inline long atomic_postinc(atomic_t *val) 61 53 { 62 atomic_count_t r = 1; 54 long r; 55 56 asm volatile ( 57 "movq $1, %0\n" 58 "lock xaddq %0, %1\n" 59 : "=r" (r), "+m" (val->count) 60 ); 61 62 return r; 63 } 64 65 static inline long atomic_postdec(atomic_t *val) 66 { 67 long r; 63 68 64 69 asm volatile ( 65 " lock xaddq %[r], %[count]\n"66 : [count] "+m" (val->count),67 [r] "+r" (r)70 "movq $-1, %0\n" 71 "lock xaddq %0, %1\n" 72 : "=r" (r), "+m" (val->count) 68 73 ); 69 74 … … 71 76 } 72 77 73 static inline atomic_count_t atomic_postdec(atomic_t *val) 74 { 75 atomic_count_t r = -1; 76 77 asm volatile ( 78 "lock xaddq %[r], %[count]\n" 79 : [count] "+m" (val->count), 80 [r] "+r" (r) 81 ); 82 83 return r; 84 } 85 86 #define atomic_preinc(val) (atomic_postinc(val) + 1) 87 #define atomic_predec(val) (atomic_postdec(val) - 1) 78 #define atomic_preinc(val) (atomic_postinc(val) + 1) 79 #define atomic_predec(val) (atomic_postdec(val) - 1) 88 80 89 81 #endif -
uspace/lib/libc/arch/amd64/include/types.h
rc2efbb4 rf516bc2 54 54 55 55 typedef uint64_t uintptr_t; 56 typedef uint64_t atomic_count_t;57 typedef int64_t atomic_signed_t;58 56 59 57 #endif -
uspace/lib/libc/arch/arm32/Makefile.inc
rc2efbb4 rf516bc2 34 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin 35 35 36 ARCH_SOURCES = \ 37 arch/$(UARCH)/src/entry.s \ 38 arch/$(UARCH)/src/thread_entry.s \ 39 arch/$(UARCH)/src/syscall.c \ 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ 40 37 arch/$(UARCH)/src/fibril.S \ 41 38 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/arm32/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup libcarm32 29 /** @addtogroup libcarm32 30 30 * @{ 31 31 */ … … 38 38 39 39 #define LIBC_ARCH_ATOMIC_H_ 40 #define CAS 40 #define CAS 41 41 42 42 #include <atomicdflt.h> … … 46 46 extern uintptr_t *ras_page; 47 47 48 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_tnv)48 static inline bool cas(atomic_t *val, long ov, long nv) 49 49 { 50 atomic_count_tret = 0;51 50 long ret = 0; 51 52 52 /* 53 53 * The following instructions between labels 1 and 2 constitute a … … 75 75 : "memory" 76 76 ); 77 77 78 78 ras_page[0] = 0; 79 asm volatile ( 80 "" ::: "memory" 81 ); 79 asm volatile ("" ::: "memory"); 82 80 ras_page[1] = 0xffffffff; 83 81 84 82 return (bool) ret; 85 83 } … … 91 89 * 92 90 * @return Value after addition. 93 *94 91 */ 95 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)92 static inline long atomic_add(atomic_t *val, int i) 96 93 { 97 atomic_count_tret = 0;98 94 long ret = 0; 95 99 96 /* 100 97 * The following instructions between labels 1 and 2 constitute a … … 118 115 : [imm] "r" (i) 119 116 ); 120 117 121 118 ras_page[0] = 0; 122 asm volatile ( 123 "" ::: "memory" 124 ); 119 asm volatile ("" ::: "memory"); 125 120 ras_page[1] = 0xffffffff; 126 121 127 122 return ret; 128 123 } … … 132 127 * 133 128 * @param val Variable to be incremented. 134 *135 129 */ 136 130 static inline void atomic_inc(atomic_t *val) … … 143 137 * 144 138 * @param val Variable to be decremented. 145 *146 139 */ 147 140 static inline void atomic_dec(atomic_t *val) … … 155 148 * @param val Variable to be incremented. 156 149 * @return Value after incrementation. 157 *158 150 */ 159 static inline atomic_count_tatomic_preinc(atomic_t *val)151 static inline long atomic_preinc(atomic_t *val) 160 152 { 161 153 return atomic_add(val, 1); … … 167 159 * @param val Variable to be decremented. 168 160 * @return Value after decrementation. 169 *170 161 */ 171 static inline atomic_count_tatomic_predec(atomic_t *val)162 static inline long atomic_predec(atomic_t *val) 172 163 { 173 164 return atomic_add(val, -1); … … 179 170 * @param val Variable to be incremented. 180 171 * @return Value before incrementation. 181 *182 172 */ 183 static inline atomic_count_tatomic_postinc(atomic_t *val)173 static inline long atomic_postinc(atomic_t *val) 184 174 { 185 175 return atomic_add(val, 1) - 1; … … 191 181 * @param val Variable to be decremented. 192 182 * @return Value before decrementation. 193 *194 183 */ 195 static inline atomic_count_tatomic_postdec(atomic_t *val)184 static inline long atomic_postdec(atomic_t *val) 196 185 { 197 186 return atomic_add(val, -1) + 1; -
uspace/lib/libc/arch/arm32/include/types.h
rc2efbb4 rf516bc2 55 55 56 56 typedef uint32_t uintptr_t; 57 typedef uint32_t atomic_count_t;58 typedef int32_t atomic_signed_t;59 57 60 58 #endif -
uspace/lib/libc/arch/ia32/Makefile.inc
rc2efbb4 rf516bc2 34 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia32/bin 35 35 36 ARCH_SOURCES = \ 37 arch/$(UARCH)/src/entry.s \ 38 arch/$(UARCH)/src/thread_entry.s \ 39 arch/$(UARCH)/src/syscall.S \ 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ 40 37 arch/$(UARCH)/src/fibril.S \ 41 38 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/ia32/include/atomic.h
rc2efbb4 rf516bc2 40 40 #include <atomicdflt.h> 41 41 42 static inline void atomic_inc(atomic_t *val) 43 { 44 asm volatile ( 45 "lock incl %[count]\n" 46 : [count] "+m" (val->count) 47 ); 42 static inline void atomic_inc(atomic_t *val) { 43 asm volatile ("lock incl %0\n" : "+m" (val->count)); 48 44 } 49 45 50 static inline void atomic_dec(atomic_t *val) 51 { 52 asm volatile ( 53 "lock decl %[count]\n" 54 : [count] "+m" (val->count) 55 ); 46 static inline void atomic_dec(atomic_t *val) { 47 asm volatile ("lock decl %0\n" : "+m" (val->count)); 56 48 } 57 49 58 static inline atomic_count_t atomic_postinc(atomic_t *val)50 static inline long atomic_postinc(atomic_t *val) 59 51 { 60 atomic_count_t r = 1; 52 long r; 53 54 asm volatile ( 55 "movl $1, %0\n" 56 "lock xaddl %0, %1\n" 57 : "=r" (r), "+m" (val->count) 58 ); 59 60 return r; 61 } 62 63 static inline long atomic_postdec(atomic_t *val) 64 { 65 long r; 61 66 62 67 asm volatile ( 63 " lock xaddl %[r], %[count]\n"64 : [count] "+m" (val->count),65 [r] "+r" (r)68 "movl $-1, %0\n" 69 "lock xaddl %0, %1\n" 70 : "=r" (r), "+m" (val->count) 66 71 ); 67 72 … … 69 74 } 70 75 71 static inline atomic_count_t atomic_postdec(atomic_t *val) 72 { 73 atomic_count_t r = -1; 74 75 asm volatile ( 76 "lock xaddl %[r], %[count]\n" 77 : [count] "+m" (val->count), 78 [r] "+r" (r) 79 ); 80 81 return r; 82 } 83 84 #define atomic_preinc(val) (atomic_postinc(val) + 1) 85 #define atomic_predec(val) (atomic_postdec(val) - 1) 76 #define atomic_preinc(val) (atomic_postinc(val) + 1) 77 #define atomic_predec(val) (atomic_postdec(val) - 1) 86 78 87 79 #endif -
uspace/lib/libc/arch/ia32/include/types.h
rc2efbb4 rf516bc2 54 54 55 55 typedef uint32_t uintptr_t; 56 typedef uint32_t atomic_count_t;57 typedef int32_t atomic_signed_t;58 56 59 57 #endif -
uspace/lib/libc/arch/ia64/Makefile.inc
rc2efbb4 rf516bc2 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin 34 34 35 ARCH_SOURCES = \ 36 arch/$(UARCH)/src/entry.s \ 37 arch/$(UARCH)/src/thread_entry.s \ 38 arch/$(UARCH)/src/syscall.S \ 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ 39 36 arch/$(UARCH)/src/fibril.S \ 40 37 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/ia64/include/atomic.h
rc2efbb4 rf516bc2 42 42 static inline void atomic_inc(atomic_t *val) 43 43 { 44 atomic_count_tv;44 long v; 45 45 46 46 asm volatile ( … … 53 53 static inline void atomic_dec(atomic_t *val) 54 54 { 55 atomic_count_tv;55 long v; 56 56 57 57 asm volatile ( … … 62 62 } 63 63 64 static inline atomic_count_tatomic_preinc(atomic_t *val)64 static inline long atomic_preinc(atomic_t *val) 65 65 { 66 atomic_count_tv;66 long v; 67 67 68 68 asm volatile ( … … 75 75 } 76 76 77 static inline atomic_count_tatomic_predec(atomic_t *val)77 static inline long atomic_predec(atomic_t *val) 78 78 { 79 atomic_count_tv;79 long v; 80 80 81 81 asm volatile ( … … 88 88 } 89 89 90 static inline atomic_count_tatomic_postinc(atomic_t *val)90 static inline long atomic_postinc(atomic_t *val) 91 91 { 92 atomic_count_tv;92 long v; 93 93 94 94 asm volatile ( … … 101 101 } 102 102 103 static inline atomic_count_tatomic_postdec(atomic_t *val)103 static inline long atomic_postdec(atomic_t *val) 104 104 { 105 atomic_count_tv;105 long v; 106 106 107 107 asm volatile ( -
uspace/lib/libc/arch/ia64/include/types.h
rc2efbb4 rf516bc2 59 59 60 60 typedef uint64_t uintptr_t; 61 typedef uint64_t atomic_count_t;62 typedef int64_t atomic_signed_t;63 61 64 62 typedef struct { -
uspace/lib/libc/arch/mips32/Makefile.inc
rc2efbb4 rf516bc2 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32/bin 34 34 35 ARCH_SOURCES = \ 36 arch/$(UARCH)/src/entry.s \ 37 arch/$(UARCH)/src/thread_entry.s \ 38 arch/$(UARCH)/src/syscall.c \ 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ 39 36 arch/$(UARCH)/src/fibril.S \ 40 37 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/mips32/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup libcmips32 29 /** @addtogroup libcmips32 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @ingroup libcmips32eb 33 * @ingroup libcmips32eb 34 34 */ 35 35 … … 41 41 #include <atomicdflt.h> 42 42 43 #define atomic_inc(x) ((void) atomic_add(x, 1))44 #define atomic_dec(x) ((void) atomic_add(x, -1))43 #define atomic_inc(x) ((void) atomic_add(x, 1)) 44 #define atomic_dec(x) ((void) atomic_add(x, -1)) 45 45 46 #define atomic_postinc(x) (atomic_add(x, 1) - 1)47 #define atomic_postdec(x) (atomic_add(x, -1) + 1)46 #define atomic_postinc(x) (atomic_add(x, 1) - 1) 47 #define atomic_postdec(x) (atomic_add(x, -1) + 1) 48 48 49 #define atomic_preinc(x) atomic_add(x, 1)50 #define atomic_predec(x) atomic_add(x, -1)49 #define atomic_preinc(x) atomic_add(x, 1) 50 #define atomic_predec(x) atomic_add(x, -1) 51 51 52 52 /* Atomic addition of immediate value. 53 53 * 54 54 * @param val Memory location to which will be the immediate value added. 55 * @param i Signed immediate that will be added to *val.55 * @param i Signed immediate that will be added to *val. 56 56 * 57 57 * @return Value after addition. 58 *59 58 */ 60 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)59 static inline long atomic_add(atomic_t *val, int i) 61 60 { 62 atomic_count_t tmp; 63 atomic_count_t v; 64 61 long tmp, v; 62 65 63 asm volatile ( 66 64 "1:\n" … … 72 70 /* nop */ /* nop is inserted automatically by compiler */ 73 71 " nop\n" 74 : "=&r" (tmp), 75 "+m" (val->count), 76 "=&r" (v) 77 : "r" (i), 78 "i" (0) 79 ); 80 72 : "=&r" (tmp), "+m" (val->count), "=&r" (v) 73 : "r" (i), "i" (0) 74 ); 75 81 76 return v; 82 77 } -
uspace/lib/libc/arch/mips32/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup libcmips32 29 /** @addtogroup libcmips32 30 30 * @{ 31 31 */ … … 55 55 56 56 typedef uint32_t uintptr_t; 57 typedef uint32_t atomic_count_t;58 typedef int32_t atomic_signed_t;59 57 60 58 #endif -
uspace/lib/libc/arch/mips32eb/Makefile.inc
rc2efbb4 rf516bc2 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32eb/bin 34 34 35 ARCH_SOURCES = \ 36 arch/$(UARCH)/src/entry.s \ 37 arch/$(UARCH)/src/thread_entry.s \ 38 arch/$(UARCH)/src/syscall.c \ 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ 39 36 arch/$(UARCH)/src/fibril.S \ 40 37 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/ppc32/Makefile.inc
rc2efbb4 rf516bc2 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc32/bin 34 34 35 ARCH_SOURCES = \ 36 arch/$(UARCH)/src/entry.s \ 37 arch/$(UARCH)/src/thread_entry.s \ 38 arch/$(UARCH)/src/syscall.c \ 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ 39 36 arch/$(UARCH)/src/fibril.S \ 40 37 arch/$(UARCH)/src/tls.c \ -
uspace/lib/libc/arch/ppc32/include/atomic.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup libcppc32 29 /** @addtogroup libcppc32 30 30 * @{ 31 31 */ … … 42 42 static inline void atomic_inc(atomic_t *val) 43 43 { 44 atomic_count_ttmp;45 44 long tmp; 45 46 46 asm volatile ( 47 47 "1:\n" … … 50 50 "stwcx. %0, 0, %2\n" 51 51 "bne- 1b" 52 : "=&r" (tmp), 53 "=m" (val->count) 54 : "r" (&val->count), 55 "m" (val->count) 56 : "cc" 57 ); 52 : "=&r" (tmp), "=m" (val->count) 53 : "r" (&val->count), "m" (val->count) 54 : "cc"); 58 55 } 59 56 60 57 static inline void atomic_dec(atomic_t *val) 61 58 { 62 atomic_count_ttmp;63 59 long tmp; 60 64 61 asm volatile ( 65 62 "1:\n" 66 63 "lwarx %0, 0, %2\n" 67 64 "addic %0, %0, -1\n" 68 "stwcx. %0, 0, %2\n"65 "stwcx. %0, 0, %2\n" 69 66 "bne- 1b" 70 : "=&r" (tmp), 71 "=m" (val->count) 72 : "r" (&val->count), 73 "m" (val->count) 74 : "cc" 75 ); 67 : "=&r" (tmp), "=m" (val->count) 68 : "r" (&val->count), "m" (val->count) 69 : "cc"); 76 70 } 77 71 78 static inline atomic_count_tatomic_postinc(atomic_t *val)72 static inline long atomic_postinc(atomic_t *val) 79 73 { 80 74 atomic_inc(val); … … 82 76 } 83 77 84 static inline atomic_count_tatomic_postdec(atomic_t *val)78 static inline long atomic_postdec(atomic_t *val) 85 79 { 86 80 atomic_dec(val); … … 88 82 } 89 83 90 static inline atomic_count_tatomic_preinc(atomic_t *val)84 static inline long atomic_preinc(atomic_t *val) 91 85 { 92 86 atomic_inc(val); … … 94 88 } 95 89 96 static inline atomic_count_tatomic_predec(atomic_t *val)90 static inline long atomic_predec(atomic_t *val) 97 91 { 98 92 atomic_dec(val); -
uspace/lib/libc/arch/ppc32/include/types.h
rc2efbb4 rf516bc2 27 27 */ 28 28 29 /** @addtogroup libcppc32 29 /** @addtogroup libcppc32 30 30 * @{ 31 31 */ … … 54 54 55 55 typedef uint32_t uintptr_t; 56 typedef uint32_t atomic_count_t;57 typedef int32_t atomic_signed_t;58 56 59 57 #endif -
uspace/lib/libc/arch/sparc64/Makefile.inc
rc2efbb4 rf516bc2 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/sparc64/bin 34 34 35 ARCH_SOURCES = \ 36 arch/$(UARCH)/src/entry.s \ 37 arch/$(UARCH)/src/thread_entry.s \ 38 arch/$(UARCH)/src/fibril.S \ 35 ARCH_SOURCES += arch/$(UARCH)/src/fibril.S \ 39 36 arch/$(UARCH)/src/tls.c \ 40 37 arch/$(UARCH)/src/stacktrace.c \ -
uspace/lib/libc/arch/sparc64/include/atomic.h
rc2efbb4 rf516bc2 46 46 * 47 47 * @param val Atomic variable. 48 * @param i Signed value to be added.48 * @param i Signed value to be added. 49 49 * 50 50 * @return Value of the atomic variable as it existed before addition. 51 *52 51 */ 53 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)52 static inline long atomic_add(atomic_t *val, int i) 54 53 { 55 atomic_count_t a; 56 atomic_count_t b; 57 54 uint64_t a, b; 55 58 56 do { 59 volatile uintptr_t ptr = (uintptr_t) &val->count;60 61 a = *(( atomic_count_t *) ptr);57 volatile uintptr_t x = (uint64_t) &val->count; 58 59 a = *((uint64_t *) x); 62 60 b = a + i; 63 64 asm volatile ( 65 "casx %0, %2, %1\n" 66 : "+m" (*((atomic_count_t *) ptr)), 67 "+r" (b) 68 : "r" (a) 69 ); 61 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a)); 70 62 } while (a != b); 71 63 72 64 return a; 73 65 } 74 66 75 static inline atomic_count_tatomic_preinc(atomic_t *val)67 static inline long atomic_preinc(atomic_t *val) 76 68 { 77 69 return atomic_add(val, 1) + 1; 78 70 } 79 71 80 static inline atomic_count_tatomic_postinc(atomic_t *val)72 static inline long atomic_postinc(atomic_t *val) 81 73 { 82 74 return atomic_add(val, 1); 83 75 } 84 76 85 static inline atomic_count_tatomic_predec(atomic_t *val)77 static inline long atomic_predec(atomic_t *val) 86 78 { 87 79 return atomic_add(val, -1) - 1; 88 80 } 89 81 90 static inline atomic_count_tatomic_postdec(atomic_t *val)82 static inline long atomic_postdec(atomic_t *val) 91 83 { 92 84 return atomic_add(val, -1); -
uspace/lib/libc/arch/sparc64/include/types.h
rc2efbb4 rf516bc2 54 54 55 55 typedef uint64_t uintptr_t; 56 typedef uint64_t atomic_count_t;57 typedef int64_t atomic_signed_t;58 56 59 57 #endif -
uspace/lib/libc/generic/async.c
rc2efbb4 rf516bc2 1101 1101 } 1102 1102 1103 /** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.1104 *1105 * Ask through phone for a new connection to some service.1106 *1107 * @param phoneid Phone handle used for contacting the other side.1108 * @param arg1 User defined argument.1109 * @param arg2 User defined argument.1110 * @param arg3 User defined argument.1111 *1112 * @return New phone handle on success or a negative error code.1113 */1114 int1115 async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)1116 {1117 int rc;1118 ipcarg_t newphid;1119 1120 rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL,1121 NULL, NULL, NULL, &newphid);1122 1123 if (rc != EOK)1124 return rc;1125 1126 return newphid;1127 }1128 1129 /** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.1130 *1131 * Ask through phone for a new connection to some service and block until1132 * success.1133 *1134 * @param phoneid Phone handle used for contacting the other side.1135 * @param arg1 User defined argument.1136 * @param arg2 User defined argument.1137 * @param arg3 User defined argument.1138 *1139 * @return New phone handle on success or a negative error code.1140 */1141 int1142 async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,1143 ipcarg_t arg3)1144 {1145 int rc;1146 ipcarg_t newphid;1147 1148 rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,1149 IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);1150 1151 if (rc != EOK)1152 return rc;1153 1154 return newphid;1155 }1156 1157 1103 /** Wrapper for making IPC_M_SHARE_IN calls using the async framework. 1158 1104 * -
uspace/lib/libc/generic/futex.c
rc2efbb4 rf516bc2 68 68 int futex_down(futex_t *futex) 69 69 { 70 if ( (atomic_signed_t)atomic_predec(futex) < 0)70 if (atomic_predec(futex) < 0) 71 71 return __SYSCALL1(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count); 72 72 … … 82 82 int futex_up(futex_t *futex) 83 83 { 84 if ( (atomic_signed_t)atomic_postinc(futex) < 0)84 if (atomic_postinc(futex) < 0) 85 85 return __SYSCALL1(SYS_FUTEX_WAKEUP, (sysarg_t) &futex->count); 86 86 -
uspace/lib/libc/include/async.h
rc2efbb4 rf516bc2 259 259 } 260 260 261 extern int async_connect_me_to(int, ipcarg_t, ipcarg_t, ipcarg_t);262 extern int async_connect_me_to_blocking(int, ipcarg_t, ipcarg_t, ipcarg_t);263 264 261 /* 265 262 * User-friendly wrappers for async_share_in_start(). -
uspace/lib/libc/include/atomicdflt.h
rc2efbb4 rf516bc2 37 37 38 38 #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. 40 40 #endif 41 41 42 #include <stdint.h>43 42 #include <bool.h> 44 43 45 44 typedef struct atomic { 46 volatile atomic_count_tcount;45 volatile long count; 47 46 } atomic_t; 48 47 49 static inline void atomic_set(atomic_t *val, atomic_count_ti)48 static inline void atomic_set(atomic_t *val, long i) 50 49 { 51 val->count = i;50 val->count = i; 52 51 } 53 52 54 static inline atomic_count_tatomic_get(atomic_t *val)53 static inline long atomic_get(atomic_t *val) 55 54 { 56 return val->count;55 return val->count; 57 56 } 58 57 59 #ifndef CAS 60 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_tnv)58 #ifndef CAS 59 static inline bool cas(atomic_t *val, long ov, long nv) 61 60 { 62 61 return __sync_bool_compare_and_swap(&val->count, ov, nv); -
uspace/lib/libc/include/ipc/services.h
rc2efbb4 rf516bc2 47 47 SERVICE_FHC, 48 48 SERVICE_OBIO, 49 SERVICE_CLIPBOARD, 50 SERVICE_NETWORKING, 51 SERVICE_LO, 52 SERVICE_DP8390, 53 SERVICE_ETHERNET, 54 SERVICE_NILDUMMY, 55 SERVICE_IP, 56 SERVICE_ARP, 57 SERVICE_RARP, 58 SERVICE_ICMP, 59 SERVICE_UDP, 60 SERVICE_TCP, 61 SERVICE_SOCKET 49 SERVICE_CLIPBOARD 62 50 } services_t; 63 51 -
uspace/lib/libc/include/stacktrace.h
rc2efbb4 rf516bc2 57 57 extern void stacktrace_prepare(void); 58 58 extern uintptr_t stacktrace_fp_get(void); 59 extern uintptr_t stacktrace_pc_get( void);59 extern uintptr_t stacktrace_pc_get(); 60 60 61 61 #endif -
uspace/srv/hid/kbd/Makefile.build
rc2efbb4 rf516bc2 150 150 endif 151 151 152 ifeq ($(UARCH),abs32le)153 SOURCES += \154 port/dummy.c \155 ctl/pc.c156 endif157 158 152 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 159 153 -
uspace/srv/loader/include/arch.h
rc2efbb4 rf516bc2 37 37 #define LOADER_ARCH_H_ 38 38 39 externvoid program_run(void *entry_point, void *pcb);39 void program_run(void *entry_point, void *pcb); 40 40 41 41 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
