[beast: 60/95] BST: use Rapicorn thread methods for thread name and id
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 60/95] BST: use Rapicorn thread methods for thread name and id
- Date: Mon, 25 Mar 2013 00:41:32 +0000 (UTC)
commit bab9ee1fea39b3335d68ef5c894f05a2d53ae385
Author: Tim Janik <timj gnu org>
Date: Wed Mar 20 04:28:27 2013 +0100
BST: use Rapicorn thread methods for thread name and id
beast-gtk/bstcxxutils.cc | 4 ++--
beast-gtk/bstmain.cc | 4 ++--
beast-gtk/bstusermessage.cc | 4 ++--
beast-gtk/testgui.cc | 2 --
4 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/beast-gtk/bstcxxutils.cc b/beast-gtk/bstcxxutils.cc
index cfbb4ca..5f94fe9 100644
--- a/beast-gtk/bstcxxutils.cc
+++ b/beast-gtk/bstcxxutils.cc
@@ -37,8 +37,8 @@ bstcxx_message_handler (const char *domain,
msg.details = details.c_str();
msg.config_check = checkmsg.c_str();
msg.janitor = bse_script_janitor();
- msg.process = sfi_thread_get_name (NULL);
- msg.pid = sfi_thread_get_pid (NULL);
+ msg.process = g_strdup (Rapicorn::ThisThread::name().c_str());
+ msg.pid = Rapicorn::ThisThread::thread_pid();
msg.n_msg_bits = 0;
msg.msg_bits = NULL;
bst_message_handler (&msg);
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index 4c656c9..f5a6b79 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -82,14 +82,14 @@ main (int argc,
srand (tv.tv_usec + (tv.tv_sec << 16));
// initialize threading and GLib types
- Bse::TaskRegistry::add ("Beast GUI", Rapicorn::ThisThread::process_pid(),
Rapicorn::ThisThread::thread_pid());
+ Rapicorn::ThreadInfo::self().name ("Beast GUI");
+ Bse::TaskRegistry::add (Rapicorn::ThreadInfo::self().name(), Rapicorn::ThisThread::process_pid(),
Rapicorn::ThisThread::thread_pid());
g_thread_init (NULL);
g_type_init ();
/* initialize Birnet/Sfi */
sfi_init (&argc, &argv, _("BEAST"), NULL); /* application name is user visible */
sfi_msg_allow ("misc");
/* ensure SFI can wake us up */
- sfi_thread_set_name ("Beast GUI");
/* initialize Gtk+ and go into threading mode */
bst_early_parse_args (&argc, &argv);
if (bst_debug_extensions)
diff --git a/beast-gtk/bstusermessage.cc b/beast-gtk/bstusermessage.cc
index aac38e0..0c448dc 100644
--- a/beast-gtk/bstusermessage.cc
+++ b/beast-gtk/bstusermessage.cc
@@ -659,8 +659,8 @@ bst_message_dialog_display (const char *log_domain,
msg.ident = sfi_msg_type_ident (SfiMsgType (mtype));
msg.label = sfi_msg_type_label (SfiMsgType (mtype));
msg.janitor = bse_script_janitor();
- msg.process = sfi_thread_get_name (NULL);
- msg.pid = sfi_thread_get_pid (NULL);
+ msg.process = g_strdup (Rapicorn::ThisThread::name().c_str());
+ msg.pid = Rapicorn::ThisThread::thread_pid();
msg.n_msg_bits = 0;
msg.msg_bits = NULL;
/* collect msg bits */
diff --git a/beast-gtk/testgui.cc b/beast-gtk/testgui.cc
index 6362525..e268d70 100644
--- a/beast-gtk/testgui.cc
+++ b/beast-gtk/testgui.cc
@@ -75,8 +75,6 @@ main (int argc,
/* initialize Sfi */
sfi_init (&argc, &argv, "TestGUI", NULL);
sfi_msg_allow ("misc");
- /* ensure SFI can wake us up */
- sfi_thread_set_name ("TestGUI");
/* initialize Gtk+ and enter threading mode */
gtk_init (&argc, &argv);
g_set_prgname ("testgui"); /* override Gdk's program name */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]