[beast: 9/20] BST: use this_thread_*() for name/getpid/gettid/online_cpus



commit d912560d2139f337a25892f47ca9777c1ee01ab5
Author: Tim Janik <timj gnu org>
Date:   Sun Sep 17 03:01:57 2017 +0200

    BST: use this_thread_*() for name/getpid/gettid/online_cpus
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/bstmain.cc        |    4 ++--
 beast-gtk/bstusermessage.cc |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index ac42e57..8be28a8 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -104,7 +104,7 @@ main (int argc, char *argv[])
 
   // initialize threading and GLib types
   Bse::ThreadInfo::self().name ("Beast GUI");
-  Bse::TaskRegistry::add (Bse::ThreadInfo::self().name(), Bse::ThisThread::process_pid(), 
Bse::ThisThread::thread_pid());
+  Bse::TaskRegistry::add (Bse::ThreadInfo::self().name(), Bse::this_thread_getpid(), 
Bse::this_thread_gettid());
 
   /* initialize Birnet/Sfi */
   sfi_init (&argc, argv);
@@ -601,7 +601,7 @@ main_cleanup ()
 
   // misc cleanups
   Bse::objects_debug_leaks();
-  Bse::TaskRegistry::remove (Bse::ThisThread::thread_pid());
+  Bse::TaskRegistry::remove (Bse::this_thread_gettid());
 
 }
 
diff --git a/beast-gtk/bstusermessage.cc b/beast-gtk/bstusermessage.cc
index 8a5547e..b6857a0 100644
--- a/beast-gtk/bstusermessage.cc
+++ b/beast-gtk/bstusermessage.cc
@@ -663,8 +663,8 @@ bst_message_dialog_display (const char     *log_domain,
   msg.ident = bst_msg_type_ident (mtype);
   msg.label = bst_msg_type_ident (mtype);
   // msg.janitor = bse_script_janitor();
-  msg.process = g_strdup (Bse::ThisThread::name().c_str());
-  msg.pid = Bse::ThisThread::thread_pid();
+  msg.process = g_strdup (Bse::this_thread_get_name().c_str());
+  msg.pid = Bse::this_thread_gettid();
   msg.n_msg_bits = 0;
   msg.msg_bits = NULL;
   /* collect msg bits */


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