Mesa (master): Revert "util: Fix helgrind complaint about one-time init"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 25 10:06:38 UTC 2020


Module: Mesa
Branch: master
Commit: 410b65185931a20acd3d7c2371bd62d9c8a7002c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=410b65185931a20acd3d7c2371bd62d9c8a7002c

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Nov 24 23:34:33 2020 +0100

Revert "util: Fix helgrind complaint about one-time init"

This reverts commit f8c7a43f33d4647c16c4892d56706a14e5d6bf17.

Acked-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7760>

---

 src/util/u_process.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/u_process.c b/src/util/u_process.c
index 992ed0e718d..9f847d1cc02 100644
--- a/src/util/u_process.c
+++ b/src/util/u_process.c
@@ -46,8 +46,6 @@
 
 #if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME)
 
-#include "debug.h"
-
 static char *path = NULL;
 
 static void __freeProgramPath()
@@ -68,7 +66,7 @@ __getProgramName()
        * Strip these arguments out by using the realpath only if it was
        * a prefix of the invocation name.
        */
-      do_once {
+      if (!path) {
          path = realpath("/proc/self/exe", NULL);
          atexit(__freeProgramPath);
       }



More information about the mesa-commit mailing list