[sysprof: 60/63] collector: set unlikely for pthread_once()



commit 484bc328ee782487bb934fc3a3ac642f5d39fe8d
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 2 15:20:06 2020 -0700

    collector: set unlikely for pthread_once()

 src/libsysprof-capture/sysprof-collector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c
index b99cd1b..d95aee8 100644
--- a/src/libsysprof-capture/sysprof-collector.c
+++ b/src/libsysprof-capture/sysprof-collector.c
@@ -475,7 +475,7 @@ collector_init_cb (void)
 void
 sysprof_collector_init (void)
 {
-  if (pthread_once (&collector_init, collector_init_cb) != 0)
+  if SYSPROF_UNLIKELY (pthread_once (&collector_init, collector_init_cb) != 0)
     abort ();
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]