hujun5 b6693065e7 pthread_once: g_lock may lead deadlock
For programs with the dependencies logic in pthread_once callback , using global locks may cause deadlock:

task A
pthread_once()
|
|-> nxrmutex_lock(&g_lock);
 -> init_routine(); // callback to wait task B
                                                  task B
                                                  pthread_once()
                                                  |
                                                   ->nxrmutex_lock(&g_lock); // Deadlock
                                                   ->init_routine(); // hold resource to wake up task A

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-26 10:13:00 +08:00
..
2023-05-17 10:24:42 +08:00
2023-07-11 23:32:17 +08:00
2023-09-26 00:15:21 +08:00
2023-09-08 00:59:31 +03:00
2023-06-12 08:39:38 +02:00
2023-07-13 10:11:58 +08:00
2023-07-13 10:11:58 +08:00
2023-07-11 23:32:17 +08:00
2023-07-28 20:56:22 -07:00
2023-09-07 23:11:10 +08:00
2023-05-19 02:40:38 +08:00
2023-07-11 23:32:17 +08:00
2023-07-29 07:28:23 -07:00
2023-05-05 18:36:36 +08:00