nuttx/libs/libc/time
Jiuzhu Dong 1b9ed5725b libc/time: Return failed when lock is already held to avoid deadlock
when enable LIBC_LOCALTIME and SYSLOG_TIMESTAMP_LOCALTIME
and zoneinfo/posixrulesi isn't exist

[ EMERG] [ap] backtrace:
[ EMERG] [ap] [20] [<0xc1cc3c4>] arm_switchcontext+0xc/0x10
[ EMERG] [ap] [20] [<0xc1ac67a>] sem_wait+0x5a/0xc0
[ EMERG] [ap] [20] [<0xc1c4588>] tzset.part.0+0x8/0x160
[ EMERG] [ap] [20] [<0xc1c58de>] localtime_r+0xc6/0x114
[ EMERG] [ap] [20] [<0xc1a910a>] clock_gettime+0x16/0xa8
[ EMERG] [ap] [20] [<0xc1b7622>] nx_vsyslog+0x9e/0xc0
[ EMERG] [ap] [20] [<0xc4ba7e0>] romfs_stat+0xa4/0xf4
[ EMERG] [ap] [20] [<0xc4b47bc>] inode_semtake+0x24/0x5c
[ EMERG] [ap] [20] [<0xc1c0102>] bsearch+0x26/0x6c
[ EMERG] [ap] [20] [<0xc1c265a>] vsyslog+0x16/0x24
[ EMERG] [ap] [20] [<0xc1c2676>] syslog+0xe/0x1c
[ EMERG] [ap] [20] [<0xc4bae12>] romfs_open+0xee/0x178  <--- err log
[ EMERG] [ap] [20] [<0xc4b68ae>] file_vopen+0x116/0x144
[ EMERG] [ap] [20] [<0xc4b6ac8>] open+0x20/0x60
[ EMERG] [ap] [20] [<0xc1c3df4>] tzload+0x84/0x810
[ EMERG] [ap] [20] [<0xc1c6ef4>] mm_zalloc+0x10/0x18
[ EMERG] [ap] [20] [<0xc4bb426>] romfs_checkmount+0x22/0x58
[ EMERG] [ap] [20] [<0xc4bad74>] romfs_open+0x50/0x178
[ EMERG] [ap] [20] [<0xc1c392c>] tzparse+0x2c/0x470
[ EMERG] [ap] [20] [<0xc1ac5da>] nxsem_wait_uninterruptible+0x8a/0xd0
[ EMERG] [ap] [20] [<0xc1ac690>] sem_wait+0x70/0xc0
[ EMERG] [ap] [20] [<0xc4b47bc>] inode_semtake+0x24/0x5c
[ EMERG] [ap] [20] [<0xc4b481c>] inode_semgive+0x28/0x58
[ EMERG] [ap] [20] [<0xc4b58b4>] file_close+0x18/0x44
[ EMERG] [ap] [20] [<0xc4b4690>] close+0x80/0xb4
[ EMERG] [ap] [20] [<0xc1c43f4>] tzload+0x684/0x810
[ EMERG] [ap] [20] [<0xc1c4616>] tzset.part.0+0x96/0x160
[ EMERG] [ap] [20] [<0xc1c58de>] localtime_r+0xc6/0x114
[ EMERG] [ap] [20] [<0xc1a910a>] clock_gettime+0x16/0xa8
[ EMERG] [ap] [20] [<0xc1ea692>] cmd_date+0x276/0x37c

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-10-19 10:27:52 +08:00
..
Kconfig Rename LIB_ to LIBC_ for all libc Kconfig 2021-08-05 19:45:24 +02:00
lib_asctime.c
lib_asctimer.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_calendar2utc.c
lib_ctime.c
lib_ctimer.c
lib_dayofweek.c
lib_daysbeforemonth.c
lib_difftime.c
lib_gethrtime.c sched/clock: Remove CLOCK_MONOTONIC option from Kconfig 2022-02-23 01:21:26 +08:00
lib_gettimeofday.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
lib_gmtime.c libc/time: Implement timegm function 2021-06-23 13:43:32 -03:00
lib_gmtimer.c libc/time: Implement timegm function 2021-06-23 13:43:32 -03:00
lib_isleapyear.c
lib_localtime.c libc/time: Return failed when lock is already held to avoid deadlock 2022-10-19 10:27:52 +08:00
lib_nanosleep.c
lib_settimeofday.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
lib_strftime.c libs/libc/time: update description of strftime 2022-03-28 00:30:53 +08:00
lib_strptime.c Remove the unnessary empty line after label 2022-09-30 17:54:56 +02:00
lib_time.c
lib_timegm.c libc/time: Implement timegm function 2021-06-23 13:43:32 -03:00
lib_timespec_get.c
Make.defs libc/time: add strptime porting support 2022-04-13 10:16:42 +08:00