Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SPIne CH_Communicatuin_Test CH_Communicatuin_Test2 MCP_SPIne ... more
Fork of mbed-dev-f303 by
Diff: hal/mbed_ticker_api.c
- Revision:
- 162:e13f6fdb2ac4
- Parent:
- 160:d5399cc887bb
- Child:
- 167:e84263d55307
--- a/hal/mbed_ticker_api.c	Thu Mar 30 13:45:57 2017 +0100
+++ b/hal/mbed_ticker_api.c	Wed Apr 12 16:21:43 2017 +0100
@@ -74,6 +74,10 @@
         prev = p;
         p = p->next;
     }
+    
+    /* if we're at the end p will be NULL, which is correct */
+    obj->next = p;
+
     /* if prev is NULL we're at the head */
     if (prev == NULL) {
         data->queue->head = obj;
@@ -81,8 +85,6 @@
     } else {
         prev->next = obj;
     }
-    /* if we're at the end p will be NULL, which is correct */
-    obj->next = p;
 
     core_util_critical_section_exit();
 }
    