]> granicus.if.org Git - esp-idf/commit
pthread: Fix pthread_once to use atomic compare and set
authorMahavir Jain <mahavir@espressif.com>
Fri, 3 Nov 2017 09:19:04 +0000 (14:49 +0530)
committerMahavir Jain <mahavir@espressif.com>
Tue, 7 Nov 2017 08:58:43 +0000 (14:28 +0530)
commit158ecdcfd50b713cf615ca389a172eca03be60f7
tree3525216ed86139a10350b93fc6d27e5a419d3ee1
parent1613044aefc2fb29e93f4eedff77ca205d49d0a6
pthread: Fix pthread_once to use atomic compare and set

Earlier recursive mutex was being used for this but since
SCOMPARE1 is already being saved/restored during context
switch, atomic compare and set can be used for this.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
components/pthread/pthread.c