Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Dependents:   denki-yohou_b TestY201 Network-RTOS NTPClient_HelloWorld ... more

Deprecated

This is the mbed 2 rtos library. mbed OS 5 integrates the mbed library with mbed-rtos. With this, we have provided thread safety for all mbed APIs. If you'd like to learn about using mbed OS 5, please see the docs.

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Mon Jan 28 14:46:06 2013 +0000
Parent:
8:88a1a9c26ae3
Child:
10:fcb1f103f7a1
Commit message:
Increase default stdlib mutex number; Provide proper error message when we run out of stdlib mutexes

Changed in this revision

rtx/RTX_CM_lib.h Show annotated file Show diff for this revision Revisions of this file
rtx/RTX_Conf_CM.c Show annotated file Show diff for this revision Revisions of this file
--- a/rtx/RTX_CM_lib.h	Tue Nov 27 16:55:38 2012 +0000
+++ b/rtx/RTX_CM_lib.h	Mon Jan 28 14:46:06 2013 +0000
@@ -31,6 +31,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *---------------------------------------------------------------------------*/
+#include "error.h"
 
 #if   defined (__CC_ARM)
 #pragma O3
@@ -157,7 +158,7 @@
 
   if (nr_mutex >= OS_MUTEXCNT) {
     /* If you are here, you need to increase the number OS_MUTEXCNT. */
-    for (;;);
+    error("Not enough stdlib mutexes\n");
   }
   *mutex = &std_libmutex[nr_mutex++];
   mutex_init (*mutex);
--- a/rtx/RTX_Conf_CM.c	Tue Nov 27 16:55:38 2012 +0000
+++ b/rtx/RTX_Conf_CM.c	Mon Jan 28 14:46:06 2013 +0000
@@ -187,7 +187,7 @@
 //  Define max. number system mutexes that are used to protect 
 //  the arm standard runtime library. For microlib they are not used.
 #ifndef OS_MUTEXCNT
- #define OS_MUTEXCNT    8
+ #define OS_MUTEXCNT    12
 #endif
 
 /*----------------------------------------------------------------------------