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. * diff --git a/readme.txt b/readme.txt index 516325898..b2f856582 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,7 @@ ***************************************************************************** *** Next *** +- NEW: Added chThdResume() function to NIL. - NEW: Removed QSPI driver model, entirely replaced by WSPI. - NEW: Added demos regarding WSPI, serial nor driver and MFS. - NEW: Modified the serial nor driver to work with WSPI instead of QSPI,