You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/10/31 20:37:24 UTC

[GitHub] ccollins476ad closed pull request #1499: kernel/os: If OS_DEBUG, ensure callouts initialized

ccollins476ad closed pull request #1499:  kernel/os: If OS_DEBUG, ensure callouts initialized
URL: https://github.com/apache/mynewt-core/pull/1499
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/kernel/os/src/os_callout.c b/kernel/os/src/os_callout.c
index 53ffe1af22..77a5ef68ff 100644
--- a/kernel/os/src/os_callout.c
+++ b/kernel/os/src/os_callout.c
@@ -71,6 +71,9 @@ os_callout_reset(struct os_callout *c, os_time_t ticks)
     os_sr_t sr;
     int ret;
 
+    /* Ensure this callout has been initialized. */
+    assert(c->c_evq != NULL);
+
     os_trace_api_u32x2(OS_TRACE_ID_CALLOUT_RESET, (uint32_t)c, (uint32_t)ticks);
 
     if (ticks > INT32_MAX) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services