mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-12 22:15:32 +00:00
Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the dynamic linker), it belongs to the base repository. Besides moving the timer and its related infrastructure (alarm, timeout libs, tests) to the base repository, this patch also moves the timer from the 'drivers' subdirectory directly to 'src' and disamibuates the timer's build locations for the various kernels. Otherwise the different timer implementations could interfere with each other when using one build directory with multiple kernels. Note that this patch changes the include paths for the former os/timer, os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/. Issue #3101
This commit is contained in:
parent
14cd115c82
commit
bf62d6b896
@ -1,20 +1,5 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc include periodic fiasco
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(REP_DIR)/recipes/src/base-fiasco/README $@
|
||||
@ -32,11 +17,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/fiasco)
|
||||
src/kernel/fiasco: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/fiasco/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32; do \
|
||||
mv lib/mk/spec/$$spec/ld-fiasco.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-fiasco/ld/" src/lib/ld/fiasco/target.mk
|
||||
sed -i "s/fiasco_timer_drv/timer/" src/drivers/timer/fiasco/target.mk
|
||||
sed -i "s/fiasco_timer_drv/timer/" src/timer/fiasco/target.mk
|
||||
|
||||
|
9
repos/base-fiasco/src/timer/fiasco/target.mk
Normal file
9
repos/base-fiasco/src/timer/fiasco/target.mk
Normal file
@ -0,0 +1,9 @@
|
||||
TARGET = fiasco_timer_drv
|
||||
LIBS += syscall-fiasco
|
||||
GEN_DIR := $(dir $(call select_from_repositories,src/timer/main.cc))
|
||||
INC_DIR += $(GEN_DIR)/periodic
|
||||
SRC_CC += periodic/time_source.cc fiasco/time_source.cc
|
||||
|
||||
vpath %.cc $(GEN_DIR)
|
||||
|
||||
include $(GEN_DIR)/target.inc
|
@ -7,21 +7,6 @@ content: $(FROM_BASE_FOC)
|
||||
$(FROM_BASE_FOC):
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc foc include periodic fiasco
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(RECIPE_DIR)/README $@
|
||||
@ -39,11 +24,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/foc)
|
||||
src/kernel/foc: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/foc/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32 x86_64 arm; do \
|
||||
mv lib/mk/spec/$$spec/ld-foc.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-foc/ld/" src/lib/ld/foc/target.mk
|
||||
sed -i "s/foc_timer_drv/timer/" src/drivers/timer/foc/target.mk
|
||||
sed -i "s/ld-foc/ld/" src/lib/ld/foc/target.mk
|
||||
sed -i "s/foc_timer_drv/timer/" src/timer/foc/target.mk
|
||||
|
||||
|
9
repos/base-foc/src/timer/foc/target.mk
Normal file
9
repos/base-foc/src/timer/foc/target.mk
Normal file
@ -0,0 +1,9 @@
|
||||
TARGET = foc_timer_drv
|
||||
LIBS += syscall-foc
|
||||
GEN_DIR := $(dir $(call select_from_repositories,src/timer/main.cc))
|
||||
INC_DIR += $(GEN_DIR)/periodic
|
||||
SRC_CC += periodic/time_source.cc fiasco/time_source.cc
|
||||
|
||||
include $(GEN_DIR)/target.inc
|
||||
|
||||
vpath %.cc $(GEN_DIR)
|
@ -8,4 +8,4 @@ LIBS += alarm
|
||||
|
||||
INC_DIR += $(BASE_DIR)/src/include
|
||||
|
||||
vpath % $(BASE_DIR)/../os/src/lib/timeout
|
||||
vpath % $(BASE_DIR)/src/lib/timeout
|
||||
|
@ -5,27 +5,12 @@ content: src/bootstrap
|
||||
src/bootstrap:
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc hw include
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: generalize_target_names
|
||||
|
||||
generalize_target_names: lib/mk src/lib src/drivers/timer
|
||||
generalize_target_names: lib/mk src/lib src/timer
|
||||
for spec in arm riscv x86_64; do \
|
||||
mv lib/mk/spec/$$spec/ld-hw.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-hw/ld/" src/lib/ld/hw/target.mk
|
||||
sed -i "s/hw_timer_drv/timer/" src/drivers/timer/hw/target.mk
|
||||
sed -i "s/hw_timer_drv/timer/" src/timer/hw/target.mk
|
||||
|
||||
|
7
repos/base-hw/src/timer/hw/target.mk
Normal file
7
repos/base-hw/src/timer/hw/target.mk
Normal file
@ -0,0 +1,7 @@
|
||||
TARGET = hw_timer_drv
|
||||
REQUIRES = hw
|
||||
LIBS = syscall-hw
|
||||
INC_DIR += $(PRG_DIR)
|
||||
SRC_CC += time_source.cc
|
||||
|
||||
include $(call select_from_repositories,src/timer/target.inc)
|
@ -15,7 +15,7 @@
|
||||
#define _TIME_SOURCE_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <os/duration.h>
|
||||
#include <base/duration.h>
|
||||
|
||||
/* local includes */
|
||||
#include <signalled_time_source.h>
|
@ -1,7 +1,8 @@
|
||||
FROM_BASE_LINUX := etc src/lib/syscall src/lib/lx_hybrid lib/import
|
||||
FROM_BASE_LINUX_AND_BASE := lib/mk src/lib/base src/include
|
||||
FROM_BASE := src/lib/alarm src/lib/timeout
|
||||
|
||||
content: $(FROM_BASE_LINUX) $(FROM_BASE_LINUX_AND_BASE) LICENSE
|
||||
content: $(FROM_BASE_LINUX) $(FROM_BASE_LINUX_AND_BASE) $(FROM_BASE) LICENSE
|
||||
|
||||
$(FROM_BASE_LINUX):
|
||||
mkdir -p $@
|
||||
@ -12,5 +13,9 @@ $(FROM_BASE_LINUX_AND_BASE):
|
||||
cp -r $(GENODE_DIR)/repos/base/$@/* $@
|
||||
cp -r $(REP_DIR)/$@/* $@
|
||||
|
||||
$(FROM_BASE):
|
||||
mkdir -p $@
|
||||
cp -r $(GENODE_DIR)/repos/base/$@/* $@
|
||||
|
||||
LICENSE:
|
||||
cp $(GENODE_DIR)/LICENSE $@
|
||||
|
@ -5,18 +5,10 @@ content: lib/import src/ld
|
||||
lib/import src/ld:
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
content: src/drivers/timer
|
||||
|
||||
TIMER_SRC := main.cc target.inc linux include periodic
|
||||
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content:
|
||||
for spec in x86_32 x86_64 arm; do \
|
||||
mv lib/mk/spec/$$spec/ld-linux.mk lib/mk/spec/$$spec/ld.mk; done;
|
||||
sed -i "s/core-linux/core/" src/core/linux/target.mk
|
||||
sed -i "s/ld-linux/ld/" src/lib/ld/linux/target.mk
|
||||
sed -i "s/linux_timer_drv/timer/" src/drivers/timer/linux/target.mk
|
||||
sed -i "s/linux_timer_drv/timer/" src/timer/linux/target.mk
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
build "core init test/region_map_mmap drivers/timer test/signal"
|
||||
build "core init test/region_map_mmap timer test/signal"
|
||||
|
||||
create_boot_directory
|
||||
|
||||
|
9
repos/base-linux/src/timer/linux/target.mk
Normal file
9
repos/base-linux/src/timer/linux/target.mk
Normal file
@ -0,0 +1,9 @@
|
||||
TARGET = linux_timer_drv
|
||||
GEN_DIR := $(call select_from_repositories,src/timer/periodic)/..
|
||||
INC_DIR += $(GEN_DIR)/periodic
|
||||
SRC_CC += periodic/time_source.cc time_source.cc
|
||||
LIBS += syscall-linux
|
||||
|
||||
include $(GEN_DIR)/target.inc
|
||||
|
||||
vpath periodic/time_source.cc $(GEN_DIR)
|
@ -1,9 +1,15 @@
|
||||
FROM_BASE_NOVA := etc include
|
||||
FROM_BASE := lib/mk/timeout.mk src/lib/timeout \
|
||||
lib/mk/alarm.mk src/lib/alarm
|
||||
|
||||
content: $(FROM_BASE_NOVA) LICENSE
|
||||
content: $(FROM_BASE_NOVA) $(FROM_BASE) LICENSE
|
||||
|
||||
$(FROM_BASE_NOVA):
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
$(FROM_BASE):
|
||||
mkdir -p $(dir $@)
|
||||
cp -r $(GENODE_DIR)/repos/base/$@ $@
|
||||
|
||||
LICENSE:
|
||||
cp $(GENODE_DIR)/LICENSE $@
|
||||
|
@ -1,25 +1,9 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc nova include
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(REP_DIR)/recipes/src/base-nova/README $@
|
||||
|
||||
|
||||
content: src/kernel/nova
|
||||
src/kernel:
|
||||
$(mirror_from_rep_dir)
|
||||
@ -29,11 +13,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/nova)
|
||||
src/kernel/nova: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/nova/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32 x86_64; do \
|
||||
mv lib/mk/spec/$$spec/ld-nova.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-nova/ld/" src/lib/ld/nova/target.mk
|
||||
sed -i "s/nova_timer_drv/timer/" src/drivers/timer/nova/target.mk
|
||||
sed -i "s/nova_timer_drv/timer/" src/timer/nova/target.mk
|
||||
|
||||
|
5
repos/base-nova/src/timer/nova/target.mk
Normal file
5
repos/base-nova/src/timer/nova/target.mk
Normal file
@ -0,0 +1,5 @@
|
||||
TARGET = nova_timer_drv
|
||||
INC_DIR += $(PRG_DIR)
|
||||
SRC_CC += time_source.cc
|
||||
|
||||
include $(call select_from_repositories,src/timer/target.inc)
|
@ -1,20 +1,5 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc pit include
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(REP_DIR)/recipes/src/base-okl4/README $@
|
||||
@ -32,11 +17,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/okl4)
|
||||
src/kernel/okl4: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/okl4/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32; do \
|
||||
mv lib/mk/spec/$$spec/ld-okl4.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-okl4/ld/" src/lib/ld/okl4/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/drivers/timer/pit/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/timer/pit/target.inc
|
||||
|
||||
|
1
repos/base-okl4/src/timer/pit/target.mk
Normal file
1
repos/base-okl4/src/timer/pit/target.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call select_from_repositories,src/timer/pit/target.inc)
|
@ -1,20 +1,5 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc pit include
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(REP_DIR)/recipes/src/base-pistachio/README $@
|
||||
@ -32,11 +17,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/pistachio)
|
||||
src/kernel/pistachio: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/pistachio/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32; do \
|
||||
mv lib/mk/spec/$$spec/ld-pistachio.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-pistachio/ld/" src/lib/ld/pistachio/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/drivers/timer/pit/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/timer/pit/target.inc
|
||||
|
||||
|
1
repos/base-pistachio/src/timer/pit/target.mk
Normal file
1
repos/base-pistachio/src/timer/pit/target.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call select_from_repositories,src/timer/pit/target.inc)
|
@ -1,18 +1,10 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc epit include
|
||||
|
||||
content: enable_board_spec
|
||||
enable_board_spec: etc/specs.conf
|
||||
echo "SPECS += wand_quad" >> etc/specs.conf
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/arm_v7/trace/timestamp.h include/os/attached_mmio.h
|
||||
content: include/os/attached_mmio.h
|
||||
|
||||
include/%.h:
|
||||
mkdir -p $(dir $@)
|
||||
@ -43,5 +35,5 @@ src/tool/elfloader: src/kernel/sel4
|
||||
content:
|
||||
mv lib/mk/spec/arm/ld-sel4.mk lib/mk/spec/arm/ld.mk;
|
||||
sed -i "s/ld-sel4/ld/" src/lib/ld/sel4/target.mk
|
||||
sed -i "s/wand_quad_timer_drv/timer/" src/drivers/timer/epit/wand_quad/target.mk
|
||||
sed -i "s/wand_quad_timer_drv/timer/" src/timer/epit/wand_quad/target.inc
|
||||
|
||||
|
@ -1,20 +1,5 @@
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
|
||||
|
||||
|
||||
TIMER_SRC := main.cc target.inc pit include
|
||||
|
||||
content: src/drivers/timer
|
||||
src/drivers/timer:
|
||||
mkdir -p $@
|
||||
cp -r $(addprefix $(GENODE_DIR)/repos/os/$@/,$(TIMER_SRC)) $@
|
||||
|
||||
content: include/spec/x86_32/trace/timestamp.h include/spec/x86_64/trace/timestamp.h
|
||||
|
||||
include/spec/%/trace/timestamp.h:
|
||||
mkdir -p $(dir $@)
|
||||
cp $(GENODE_DIR)/repos/os/$@ $@
|
||||
|
||||
|
||||
content: README
|
||||
README:
|
||||
cp $(REP_DIR)/recipes/src/base-sel4-x86/README $@
|
||||
@ -32,11 +17,10 @@ KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/sel4)
|
||||
src/kernel/sel4: src/kernel
|
||||
cp -r $(KERNEL_PORT_DIR)/src/kernel/sel4/* $@
|
||||
|
||||
|
||||
content:
|
||||
for spec in x86_32 x86_64 arm; do \
|
||||
mv lib/mk/spec/$$spec/ld-sel4.mk lib/mk/spec/$$spec/ld.mk; \
|
||||
done;
|
||||
sed -i "s/ld-sel4/ld/" src/lib/ld/sel4/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/drivers/timer/pit/target.mk
|
||||
sed -i "s/pit_timer_drv/timer/" src/timer/pit/target.inc
|
||||
|
||||
|
1
repos/base-sel4/src/timer/epit/wand_quad/target.mk
Normal file
1
repos/base-sel4/src/timer/epit/wand_quad/target.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call select_from_repositories,src/timer/epit/wand_quad/target.inc)
|
1
repos/base-sel4/src/timer/pit/target.mk
Normal file
1
repos/base-sel4/src/timer/pit/target.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call select_from_repositories,src/timer/pit/target.inc)
|
@ -11,8 +11,8 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__OS__ALARM_H_
|
||||
#define _INCLUDE__OS__ALARM_H_
|
||||
#ifndef _INCLUDE__BASE__ALARM_H_
|
||||
#define _INCLUDE__BASE__ALARM_H_
|
||||
|
||||
#include <base/lock.h>
|
||||
|
||||
@ -186,4 +186,4 @@ class Genode::Alarm_scheduler
|
||||
bool head_timeout(const Alarm * alarm) { return _head == alarm; }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__OS__ALARM_H_ */
|
||||
#endif /* _INCLUDE__BASE__ALARM_H_ */
|
@ -11,8 +11,8 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _OS__DURATION_H_
|
||||
#define _OS__DURATION_H_
|
||||
#ifndef _INCLUDE__BASE__DURATION_H_
|
||||
#define _INCLUDE__BASE__DURATION_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/stdint.h>
|
||||
@ -115,4 +115,4 @@ namespace Genode
|
||||
return (x.value > y.value) ? x : y; }
|
||||
};
|
||||
|
||||
#endif /* _OS__DURATION_H_ */
|
||||
#endif /* _INCLUDE__BASE__DURATION_H_ */
|
@ -16,13 +16,13 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__OS__TIMED_SEMAPHORE_H_
|
||||
#define _INCLUDE__OS__TIMED_SEMAPHORE_H_
|
||||
#ifndef _INCLUDE__BASE__TIMED_SEMAPHORE_H_
|
||||
#define _INCLUDE__BASE__TIMED_SEMAPHORE_H_
|
||||
|
||||
#include <base/thread.h>
|
||||
#include <base/semaphore.h>
|
||||
#include <base/alarm.h>
|
||||
#include <timer_session/connection.h>
|
||||
#include <os/alarm.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
@ -254,4 +254,4 @@ class Genode::Timed_semaphore : public Semaphore
|
||||
void up() { Semaphore::up(); }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__OS__TIMED_SEMAPHORE_H_ */
|
||||
#endif /* _INCLUDE__BASE__TIMED_SEMAPHORE_H_ */
|
@ -23,7 +23,7 @@
|
||||
#include <util/noncopyable.h>
|
||||
#include <base/lock.h>
|
||||
#include <base/log.h>
|
||||
#include <os/duration.h>
|
||||
#include <base/duration.h>
|
||||
|
||||
namespace Genode {
|
||||
|
3
repos/base/lib/mk/alarm.mk
Normal file
3
repos/base/lib/mk/alarm.mk
Normal file
@ -0,0 +1,3 @@
|
||||
SRC_CC = alarm.cc
|
||||
|
||||
vpath alarm.cc $(call select_from_repositories,src/lib/alarm)
|
@ -7,4 +7,4 @@ LIBS += alarm
|
||||
|
||||
INC_DIR += $(BASE_DIR)/src/include
|
||||
|
||||
vpath % $(BASE_DIR)/../os/src/lib/timeout
|
||||
vpath % $(BASE_DIR)/src/lib/timeout
|
@ -8,4 +8,4 @@ LIBS += alarm
|
||||
|
||||
INC_DIR += $(BASE_DIR)/src/include
|
||||
|
||||
vpath % $(REP_DIR)/src/lib/timeout
|
||||
vpath % $(call select_from_repositories,src/lib/timeout)
|
@ -6,11 +6,6 @@ ARCHS := riscv arm_v6 arm_v7 x86_32 x86_64
|
||||
include:
|
||||
mkdir -p include
|
||||
cp -r $(REP_DIR)/include/* $@/
|
||||
for a in ${ARCHS}; do \
|
||||
mkdir -p include/spec/$$a/trace; \
|
||||
cp $(GENODE_DIR)/repos/os/include/spec/$$a/trace/timestamp.h \
|
||||
include/spec/$$a/trace; \
|
||||
done
|
||||
|
||||
LIB_MK_FILES := base.mk ld.mk ldso-startup.mk
|
||||
|
||||
|
9
repos/base/recipes/api/timer_session/content.mk
Normal file
9
repos/base/recipes/api/timer_session/content.mk
Normal file
@ -0,0 +1,9 @@
|
||||
MIRRORED_FROM_REP_DIR := include/timer_session include/timer
|
||||
|
||||
content: $(MIRRORED_FROM_REP_DIR) LICENSE
|
||||
|
||||
$(MIRRORED_FROM_REP_DIR):
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
LICENSE:
|
||||
cp $(GENODE_DIR)/LICENSE $@
|
@ -2,9 +2,9 @@
|
||||
# Common content rules shared among all base-<kernel> source archives
|
||||
#
|
||||
|
||||
content: src/include src/core src/lib src/drivers/timer lib/mk LICENSE
|
||||
content: src/include src/core src/lib src/timer lib/mk LICENSE
|
||||
|
||||
src/include src/core src/lib lib/mk:
|
||||
src/include src/core src/lib src/timer lib/mk:
|
||||
mkdir -p $@
|
||||
cp -r $(GENODE_DIR)/repos/base/$@/* $@
|
||||
cp -r $(REP_DIR)/$@/* $@
|
||||
@ -16,17 +16,3 @@ content: etc/specs.conf
|
||||
|
||||
etc/specs.conf:
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
MIRRORED_FROM_OS := $(addprefix lib/mk/,timeout.mk timeout-arm.mk alarm.mk timed_semaphore.mk)\
|
||||
$(addprefix src/lib/,timeout alarm timed_semaphore) \
|
||||
$(addprefix include/os/,alarm.h duration.h timed_semaphore.h) \
|
||||
include/timer/timeout.h \
|
||||
include/timer_session
|
||||
|
||||
content: $(MIRRORED_FROM_OS)
|
||||
|
||||
$(MIRRORED_FROM_OS): lib/mk
|
||||
|
||||
$(MIRRORED_FROM_OS):
|
||||
mkdir -p $(dir $@)
|
||||
cp -r $(GENODE_DIR)/repos/os/$@ $(dir $@)
|
||||
|
@ -1,7 +1,7 @@
|
||||
SRC_DIR = src/test/timed_semaphore src/lib/timed_semaphore
|
||||
SRC_DIR = src/test/timed_semaphore src/lib/timed_semaphore src/lib/alarm
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/content.inc
|
||||
|
||||
MIRROR_FROM_REP_DIR := lib/mk/timed_semaphore.mk
|
||||
MIRROR_FROM_REP_DIR := lib/mk/timed_semaphore.mk lib/mk/alarm.mk
|
||||
|
||||
content: $(MIRROR_FROM_REP_DIR)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# build program images
|
||||
build { core init drivers/timer test/timer_accuracy }
|
||||
build { core init timer test/timer_accuracy }
|
||||
|
||||
# create directory where boot files are written to
|
||||
create_boot_directory
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <base/log.h>
|
||||
#include <os/alarm.h>
|
||||
#include <base/alarm.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <util/string.h>
|
||||
#include <base/thread.h>
|
||||
#include <base/heap.h>
|
||||
#include <os/timed_semaphore.h>
|
||||
#include <base/timed_semaphore.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/unmanaged_singleton.h>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#include <os/timed_semaphore.h>
|
||||
#include <base/timed_semaphore.h>
|
||||
|
||||
|
||||
Genode::Env *Genode::Timeout_thread::_env = nullptr;
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <os/duration.h>
|
||||
#include <base/duration.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <timer_session/connection.h>
|
||||
#include <os/timed_semaphore.h>
|
||||
#include <base/timed_semaphore.h>
|
||||
#include <base/thread.h>
|
||||
#include <base/component.h>
|
||||
|
9
repos/base/src/timer/epit/wand_quad/target.inc
Normal file
9
repos/base/src/timer/epit/wand_quad/target.inc
Normal file
@ -0,0 +1,9 @@
|
||||
TARGET = wand_quad_timer_drv
|
||||
REQUIRES = wand_quad
|
||||
GEN_DIR := $(dir $(call select_from_repositories,src/timer/main.cc))
|
||||
INC_DIR += $(GEN_DIR)/epit
|
||||
SRC_CC += epit/time_source.cc epit/wand_quad/timer.cc
|
||||
|
||||
include $(GEN_DIR)/target.inc
|
||||
|
||||
vpath %.cc $(GEN_DIR)
|
9
repos/base/src/timer/pit/target.inc
Normal file
9
repos/base/src/timer/pit/target.inc
Normal file
@ -0,0 +1,9 @@
|
||||
TARGET = pit_timer_drv
|
||||
REQUIRES = x86
|
||||
GEN_DIR := $(dir $(call select_from_repositories,src/timer/main.cc))
|
||||
INC_DIR += $(GEN_DIR)/pit
|
||||
SRC_CC += time_source.cc
|
||||
|
||||
include $(GEN_DIR)/target.inc
|
||||
|
||||
vpath time_source.cc $(GEN_DIR)/pit
|
@ -18,7 +18,7 @@
|
||||
/* Genode includes */
|
||||
#include <io_port_session/connection.h>
|
||||
#include <irq_session/connection.h>
|
||||
#include <os/duration.h>
|
||||
#include <base/duration.h>
|
||||
|
||||
/* local includes */
|
||||
#include <signalled_time_source.h>
|
5
repos/base/src/timer/target.inc
Normal file
5
repos/base/src/timer/target.inc
Normal file
@ -0,0 +1,5 @@
|
||||
SRC_CC += main.cc
|
||||
LIBS += base
|
||||
INC_DIR += $(call select_from_repositories,src/timer/include)
|
||||
|
||||
vpath main.cc $(dir $(call select_from_repositories,src/timer/main.cc))
|
@ -16,8 +16,7 @@ if {[have_spec linux]} {
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/audio
|
||||
test/audio_in
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ set use_mixer 0
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/audio
|
||||
test/audio_out
|
||||
}
|
||||
|
@ -3,8 +3,7 @@
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/framebuffer/intel
|
||||
test/framebuffer
|
||||
server/report_rom
|
||||
|
@ -12,8 +12,8 @@ proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv
|
||||
return gpio_drv }
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer drivers/nic
|
||||
core init timer
|
||||
drivers/nic
|
||||
test/lxip/http_srv
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,8 @@ set use_nic_driver [expr [have_spec linux] || [expr !$use_usb_driver && ![have_s
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer drivers/nic
|
||||
core init timer
|
||||
drivers/nic
|
||||
test/lxip/udp_echo
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ proc platform_drv_priority {} { return { priority="-1"} }
|
||||
|
||||
append build_components { core }
|
||||
append build_components { init }
|
||||
append build_components { drivers/timer }
|
||||
append build_components { timer }
|
||||
append build_components { server/nic_router }
|
||||
append build_components { server/dynamic_rom }
|
||||
append build_components { server/report_rom }
|
||||
|
@ -58,8 +58,7 @@ if { [get_cmd_switch --autopilot] && ![have_spec x86_64] } {
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/usb_host
|
||||
drivers/usb_hid
|
||||
test/input
|
||||
|
@ -3,8 +3,7 @@
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/usb
|
||||
test/input
|
||||
}
|
||||
|
@ -23,8 +23,7 @@ if { [get_cmd_switch --autopilot] && ![have_spec x86_64] } {
|
||||
#
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
drivers/timer
|
||||
core init timer
|
||||
drivers/usb
|
||||
test/input
|
||||
server/dynamic_rom
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user