From da4f9beaee8f1f8f344012b4d9a122462a6c802e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 10 Mar 2009 15:31:58 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/include/sys.h | 4 ++++ src/include/vt.h | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/sys.h b/src/include/sys.h index 90fbfd1a1..a84d33da8 100644 --- a/src/include/sys.h +++ b/src/include/sys.h @@ -171,6 +171,10 @@ extern "C" { #endif void chSysInit(void); void chSysTimerHandlerI(void); +#if CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED + void chSysLock(void); + void chSysUnlock(void); +#endif /* CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED */ #ifdef __cplusplus } #endif diff --git a/src/include/vt.h b/src/include/vt.h index e104bb101..e736e1af0 100644 --- a/src/include/vt.h +++ b/src/include/vt.h @@ -104,7 +104,7 @@ extern "C" { void vt_init(void); void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par); void chVTResetI(VirtualTimer *vtp); - bool_t chSysInTimeWindow(systime_t start, systime_t end); + bool_t chTimeIsWithin(systime_t start, systime_t end); #ifdef __cplusplus } #endif @@ -118,8 +118,20 @@ extern "C" { * @note The counter can reach its maximum and then returns to zero. * @note This function is designed to work with the @p chThdSleepUntil(). */ -#define chSysGetTime() (vtlist.vt_systime) +#define chTimeNow() (vtlist.vt_systime) +/** + * Provided for backward compatibility. + * @deprecated Will be removed in 1.2.0. + */ +#define chSysGetTime() chTimeNow() + +/** + * Provided for backward compatibility. + * @deprecated Will be removed in 1.2.0. + */ +#define chSysInTimeWindow(start, end) chTimeIsWithin(start, end) + #endif /* _VT_H_ */ /** @} */ -- cgit v1.2.3