[lwIP] fix lwip sem/mutex valid issue.

This commit is contained in:
bernard 2022-12-03 15:39:08 +08:00 committed by Man, Jianting (Meco)
parent ecf2d82159
commit c53d9da22e
2 changed files with 16 additions and 4 deletions

View File

@ -39,7 +39,7 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -g -march=armv8-a -mtune=cortex-a53'
CFLAGS = DEVICE + ' -Wall '
CFLAGS = DEVICE + ' -Wall -fdiagnostics-color=always'
AFLAGS = ' -c' + ' -x assembler-with-cpp -D__ASSEMBLY__'
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds'
CPATH = ''

View File

@ -208,7 +208,11 @@ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
*/
int sys_sem_valid(sys_sem_t *sem)
{
return (int)(*sem);
int ret = 0;
if (*sem) ret = 1;
return ret;
}
#endif
@ -283,7 +287,11 @@ void sys_mutex_free(sys_mutex_t *mutex)
*/
int sys_mutex_valid(sys_mutex_t *mutex)
{
return (int)(*mutex);
int ret = 0;
if (*mutex) ret = 1;
return ret;
}
#endif
@ -458,7 +466,11 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
*/
int sys_mbox_valid(sys_mbox_t *mbox)
{
return (int)(*mbox);
int ret = 0;
if (*mbox) ret = 1;
return ret;
}
#endif