mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
pthread: remove enter_critical_section in pthread_barrier_wait
reason: We decouple semcount from business logic by using an independent counting variable, which allows us to remove critical sections in many cases. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -368,6 +368,8 @@ struct pthread_barrier_s
|
||||
{
|
||||
sem_t sem;
|
||||
unsigned int count;
|
||||
unsigned int wait_count;
|
||||
mutex_t mutex;
|
||||
};
|
||||
|
||||
#ifndef __PTHREAD_BARRIER_T_DEFINED
|
||||
|
||||
Reference in New Issue
Block a user