@@ -374,7 +374,7 @@ __attribute__((section(".rodata"))) =
374
374
0U ,
375
375
#endif
376
376
{ & os_isr_queue [0 ], (uint16_t )(sizeof (os_isr_queue )/sizeof (void * )), 0U },
377
- {
377
+ {
378
378
// Memory Pools (Variable Block Size)
379
379
#if ((OS_THREAD_OBJ_MEM != 0 ) && (OS_THREAD_USER_STACK_SIZE != 0 ))
380
380
& os_thread_stack [0 ], sizeof (os_thread_stack ),
@@ -407,7 +407,7 @@ __attribute__((section(".rodata"))) =
407
407
#endif
408
408
& os_mpi_thread ,
409
409
#else
410
- NULL ,
410
+ NULL ,
411
411
NULL ,
412
412
#endif
413
413
#if (OS_TIMER_OBJ_MEM != 0 )
@@ -490,7 +490,7 @@ __asm void os_cb_sections_wrapper (void) {
490
490
EXTERN || .bss .os .mempool .cb$$Limit || [WEAK ]
491
491
EXTERN || .bss .os .msgqueue .cb$$Base || [WEAK ]
492
492
EXTERN || .bss .os .msgqueue .cb$$Limit || [WEAK ]
493
-
493
+
494
494
AREA || .rodata || , DATA , READONLY
495
495
EXPORT os_cb_sections
496
496
os_cb_sections
@@ -676,11 +676,12 @@ typedef void *mutex;
676
676
//lint -e818 "Pointer 'm' could be declared as pointing to const"
677
677
678
678
// Initialize mutex
679
+ #if !defined(__ARMCC_VERSION ) || __ARMCC_VERSION < 6010050
679
680
__USED
681
+ #endif
680
682
int _mutex_initialize (mutex * m );
681
- int _mutex_initialize (mutex * m ) {
683
+ __WEAK int _mutex_initialize (mutex * m ) {
682
684
int result ;
683
-
684
685
* m = osMutexNew (NULL );
685
686
if (* m != NULL ) {
686
687
result = 1 ;
@@ -692,26 +693,32 @@ int _mutex_initialize(mutex *m) {
692
693
}
693
694
694
695
// Acquire mutex
696
+ #if !defined(__ARMCC_VERSION ) || __ARMCC_VERSION < 6010050
695
697
__USED
696
- void _mutex_acquire (mutex * m );
698
+ #endif
699
+ __WEAK void _mutex_acquire (mutex * m );
697
700
void _mutex_acquire (mutex * m ) {
698
701
if (os_kernel_is_active () != 0U ) {
699
702
(void )osMutexAcquire (* m , osWaitForever );
700
703
}
701
704
}
702
705
703
706
// Release mutex
707
+ #if !defined(__ARMCC_VERSION ) || __ARMCC_VERSION < 6010050
704
708
__USED
705
- void _mutex_release (mutex * m );
709
+ #endif
710
+ __WEAK void _mutex_release (mutex * m );
706
711
void _mutex_release (mutex * m ) {
707
712
if (os_kernel_is_active () != 0U ) {
708
713
(void )osMutexRelease (* m );
709
714
}
710
715
}
711
716
712
717
// Free mutex
718
+ #if !defined(__ARMCC_VERSION ) || __ARMCC_VERSION < 6010050
713
719
__USED
714
- void _mutex_free (mutex * m );
720
+ #endif
721
+ __WEAK void _mutex_free (mutex * m );
715
722
void _mutex_free (mutex * m ) {
716
723
(void )osMutexDelete (* m );
717
724
}
0 commit comments