[beast: 41/95] BSE: use bse_main_wakeup() to wakeup main BSE thread
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 41/95] BSE: use bse_main_wakeup() to wakeup main BSE thread
- Date: Mon, 25 Mar 2013 00:39:57 +0000 (UTC)
commit 148923096b559ef1d990a0c05c705ce392b3c2f3
Author: Tim Janik <timj gnu org>
Date: Tue Mar 19 01:33:16 2013 +0100
BSE: use bse_main_wakeup() to wakeup main BSE thread
bse/bsemain.cc | 8 ++++++++
bse/bsemain.hh | 2 ++
bse/bsemidinotifier.cc | 3 ++-
3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index fd24a75..42e6fec 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -175,6 +175,14 @@ bse_init_glue_context (const gchar *client)
while (!adata.context);
return adata.context;
}
+
+void
+bse_main_wakeup ()
+{
+ g_return_if_fail (bse_main_context != NULL);
+ g_main_context_wakeup (bse_main_context);
+}
+
static void
bse_init_core (void)
{
diff --git a/bse/bsemain.hh b/bse/bsemain.hh
index 8b6c993..a66f4c1 100644
--- a/bse/bsemain.hh
+++ b/bse/bsemain.hh
@@ -26,6 +26,8 @@ void bse_init_test (gint *argc,
SfiInitValue values[]);
/* BSE thread pid (or 0) */
guint bse_main_getpid (void);
+void bse_main_wakeup ();
+
/* messaging */
void bse_message_setup_thread_handler (void);
void bse_message_to_default_handler (const BseMessage *msg);
diff --git a/bse/bsemidinotifier.cc b/bse/bsemidinotifier.cc
index f9dd6fa..1133613 100644
--- a/bse/bsemidinotifier.cc
+++ b/bse/bsemidinotifier.cc
@@ -242,8 +242,9 @@ bse_midi_notifiers_attach_source (void)
g_source_set_priority (source, BSE_PRIORITY_NORMAL);
g_source_attach (source, bse_main_context);
}
+
void
bse_midi_notifiers_wakeup (void)
{
- g_main_context_wakeup (bse_main_context);
+ bse_main_wakeup();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]