From fe6b435794ac470183b62b70ae446d2ca88dc155 Mon Sep 17 00:00:00 2001 From: kimu_shu Date: Wed, 21 Aug 2019 05:29:14 +0000 Subject: [PATCH] Fix bspconfig.h defines --- platform/zynq/data/tinythreads.tcl | 15 +++++++++++++++ platform/zynq/src/priv/tth_arch_armv7a.h | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/platform/zynq/data/tinythreads.tcl b/platform/zynq/data/tinythreads.tcl index 772ec65..4919ff2 100644 --- a/platform/zynq/data/tinythreads.tcl +++ b/platform/zynq/data/tinythreads.tcl @@ -112,6 +112,21 @@ proc generate {os_handle} { puts $fd "#define TTHREAD_STRICT_CHECK [bool2int [common::get_property CONFIG.strict_check $os_handle]]" puts $fd "#define TTHREAD_ENABLE_VFP_SWITCH [bool2int [common::get_property CONFIG.enable_vfp_switch $os_handle]]" puts $fd "#define TTHREAD_TICKS_PER_SEC ([common::get_property CONFIG.ticks_per_second $os_handle])" + puts $fd "" + if { [common::get_property CONFIG.enable_clock $os_handle] == "true" } { + puts $fd "#define _POSIX_TIMERS /* For clock_gettime,clock_getres in */" + puts $fd "#define _POSIX_MONOTONIC_CLOCK /* For CLOCK_MONOTONIC in */" + } + puts $fd "" + puts $fd "#ifndef __ASSEMBLER__" + puts $fd "#ifdef __cplusplus" + puts $fd "extern \"C\" {" + puts $fd "#endif" + puts $fd "extern void *tth_get_xscugic_instance(void);" + puts $fd "#ifdef __cplusplus" + puts $fd "} /* extern \"C\" */" + puts $fd "#endif" + puts $fd "#endif /* __ASSEMBLER__ */" close $fd } diff --git a/platform/zynq/src/priv/tth_arch_armv7a.h b/platform/zynq/src/priv/tth_arch_armv7a.h index eda8b0b..56e1300 100644 --- a/platform/zynq/src/priv/tth_arch_armv7a.h +++ b/platform/zynq/src/priv/tth_arch_armv7a.h @@ -4,7 +4,6 @@ #include #if defined(__PS7_CORTEXA9__) # include -# define _POSIX_MONOTONIC_CLOCK #else # error "Unknown platform for ARMv7-A ports." #endif