From 967e54950ed604ab6ffe500dce41f25c27ede559 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 12 Oct 2018 14:07:18 +0000 Subject: Added one missing function variant. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12354 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/nil/include/ch.h | 19 +++---------------- os/nil/src/ch.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'os') diff --git a/os/nil/include/ch.h b/os/nil/include/ch.h index 70696e84d..6d595a88b 100644 --- a/os/nil/include/ch.h +++ b/os/nil/include/ch.h @@ -55,7 +55,7 @@ /** * @brief Kernel version string. */ -#define CH_KERNEL_VERSION "3.0.0" +#define CH_KERNEL_VERSION "3.1.0" /** * @brief Kernel version major number. @@ -65,7 +65,7 @@ /** * @brief Kernel version minor number. */ -#define CH_KERNEL_MINOR 0 +#define CH_KERNEL_MINOR 1 /** * @brief Kernel version patch number. @@ -463,11 +463,6 @@ #define CH_CFG_ST_FREQUENCY 1000 #endif -/* Restricted subsystems.*/ -#undef CH_CFG_USE_MAILBOXES - -#define CH_CFG_USE_MAILBOXES FALSE - #endif /* (CH_LICENSE_FEATURES == CH_FEATURES_INTERMEDIATE) || (CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */ @@ -478,15 +473,6 @@ #undef CH_CFG_ST_TIMEDELTA #define CH_CFG_ST_TIMEDELTA 0 -/* Restricted subsystems.*/ -#undef CH_CFG_USE_MEMCORE -#undef CH_CFG_USE_MEMPOOLS -#undef CH_CFG_USE_HEAP - -#define CH_CFG_USE_MEMCORE FALSE -#define CH_CFG_USE_MEMPOOLS FALSE -#define CH_CFG_USE_HEAP FALSE - #endif /* CH_LICENSE_FEATURES == CH_FEATURES_BASIC */ #if !defined(_CHIBIOS_NIL_CONF_) @@ -1545,6 +1531,7 @@ extern "C" { msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout); msg_t chThdSuspendTimeoutS(thread_reference_t *trp, sysinterval_t timeout); void chThdResumeI(thread_reference_t *trp, msg_t msg); + void chThdResume(thread_reference_t *trp, msg_t msg); void chThdSleep(sysinterval_t timeout); void chThdSleepUntil(systime_t abstime); msg_t chThdEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout); diff --git a/os/nil/src/ch.c b/os/nil/src/ch.c index a15a986a5..38fb936e2 100644 --- a/os/nil/src/ch.c +++ b/os/nil/src/ch.c @@ -739,6 +739,24 @@ void chThdResumeI(thread_reference_t *trp, msg_t msg) { } } +/** + * @brief Wakes up a thread waiting on a thread reference object. + * @note This function must reschedule, it can only be called from thread + * context. + * + * @param[in] trp a pointer to a thread reference object + * @param[in] msg the message code + * + * @api + */ +void chThdResume(thread_reference_t *trp, msg_t msg) { + + chSysLock(); + chThdResumeI(trp, msg); + chSchRescheduleS(); + chSysUnlock(); +} + /** * @brief Suspends the invoking thread for the specified time. * -- cgit v1.2.3