ソースを参照

RTX5: updated to CMSIS RTOS2 API V2.1.2

Robert Rostohar 8 年 前
コミット
caad272e8b
2 ファイル変更3 行追加10 行削除
  1. 1 0
      CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt
  2. 2 10
      CMSIS/RTOS2/RTX/Source/rtx_kernel.c

+ 1 - 0
CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt

@@ -163,6 +163,7 @@ File/Folder                  | Content
     <tr>
       <td>V5.2.3</td>
       <td>
+       - Based on CMSIS-RTOS API V2.1.2.
        - Moved SVC/PendSV handler priority setup from osKernelInitialize to osKernelStart (User Priority Grouping can be updated after osKernelInitialize but before osKernelStart).
        - Corrected SysTick and PendSV handlers for ARMv8-M Baseline.
        - Corrected memory allocation for stack and data when "Object specific Memory allocation" configuration is used.

+ 2 - 10
CMSIS/RTOS2/RTX/Source/rtx_kernel.c

@@ -512,11 +512,7 @@ osStatus_t osKernelInitialize (void) {
 ///  Get RTOS Kernel Information.
 osStatus_t osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size) {
   EvrRtxKernelGetInfo(version, id_buf, id_size);
-  if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
-    EvrRtxKernelError(osErrorISR);
-    return osErrorISR;
-  }
-  if (IS_PRIVILEGED()) {
+  if (IS_PRIVILEGED() || IS_IRQ_MODE() || IS_IRQ_MASKED()) {
     return svcRtxKernelGetInfo(version, id_buf, id_size);
   } else {
     return  __svcKernelGetInfo(version, id_buf, id_size);
@@ -525,11 +521,7 @@ osStatus_t osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size
 
 /// Get the current RTOS Kernel state.
 osKernelState_t osKernelGetState (void) {
-  if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
-    EvrRtxKernelGetState(osKernelError);
-    return osKernelError;
-  }
-  if (IS_PRIVILEGED()) {
+  if (IS_PRIVILEGED() || IS_IRQ_MODE() || IS_IRQ_MASKED()) {
     return svcRtxKernelGetState();
   } else {
     return  __svcKernelGetState();