summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit1b8170fc1d70089e253eb9a77abdd6601d94f6bf (patch)
tree989eace5fd188caf898503a5760a92a24327b1cc
parentf0179c98cf1f9112b1b47b159feebfc5a72c35c2 (diff)
downloadraul-1b8170fc1d70089e253eb9a77abdd6601d94f6bf.tar.gz
raul-1b8170fc1d70089e253eb9a77abdd6601d94f6bf.tar.bz2
raul-1b8170fc1d70089e253eb9a77abdd6601d94f6bf.zip
Save Ingen patches as working standard LV2 plugin bundles.
This allows you to create an Ingen patch in Ingen running as a Jack client, save it, then load that patch as an LV2 plugin in any LV2 compliant host. Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process). More API/ABI stable interface for Ingen::Shared::World. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2533 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--raul/Thread.hpp15
-rw-r--r--src/Thread.cpp2
-rw-r--r--wscript5
3 files changed, 11 insertions, 11 deletions
diff --git a/raul/Thread.hpp b/raul/Thread.hpp
index 4d5cef3..a9300b1 100644
--- a/raul/Thread.hpp
+++ b/raul/Thread.hpp
@@ -18,6 +18,7 @@
#ifndef RAUL_THREAD_HPP
#define RAUL_THREAD_HPP
+#include <set>
#include <string>
#include <iostream>
#include <pthread.h>
@@ -59,8 +60,8 @@ public:
const std::string& name() const { return _name; }
void set_name(const std::string& name) { _name = name; }
- unsigned context() const { return _context; }
- void set_context(unsigned context) { _context = context; }
+ bool is_context(unsigned context) const { return _contexts.find(context) != _contexts.end(); }
+ void set_context(unsigned context) { _contexts.insert(context); }
protected:
Thread(const std::string& name="");
@@ -92,11 +93,11 @@ private:
/* Once-only initialisation of the key */
static pthread_once_t _thread_key_once;
- unsigned _context;
- std::string _name;
- bool _pthread_exists;
- bool _own_thread;
- pthread_t _pthread;
+ std::set<unsigned> _contexts;
+ std::string _name;
+ bool _pthread_exists;
+ bool _own_thread;
+ pthread_t _pthread;
};
diff --git a/src/Thread.cpp b/src/Thread.cpp
index 9c1a920..15ddf0b 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -32,7 +32,6 @@ pthread_key_t Thread::_thread_key;
Thread::Thread(const std::string& name)
: _exit_flag(false)
- , _context(0)
, _name(name)
, _pthread_exists(false)
, _own_thread(true)
@@ -45,7 +44,6 @@ Thread::Thread(const std::string& name)
/** Must be called from thread */
Thread::Thread(pthread_t thread, const std::string& name)
: _exit_flag(false)
- , _context(0)
, _name(name)
, _pthread_exists(true)
, _own_thread(false)
diff --git a/wscript b/wscript
index b8cc3a0..be8b64d 100644
--- a/wscript
+++ b/wscript
@@ -4,7 +4,7 @@ import Options
import os
# Version of this package (even if built as a child)
-RAUL_VERSION = '0.6.5'
+RAUL_VERSION = '0.6.6'
# Library version (UNIX style major, minor, micro)
# major increment <=> incompatible changes
@@ -20,7 +20,8 @@ RAUL_VERSION = '0.6.5'
# 0.6.3 = 6,0,0 (unreleased)
# 0.6.4 = 7,0,0 (unreleased)
# 0.6.5 = 8,0,0 (unreleased)
-RAUL_LIB_VERSION = '8.0.0'
+# 0.6.6 = 9,0,0 (unreleased)
+RAUL_LIB_VERSION = '9.0.0'
# Variables for 'waf dist'
APPNAME = 'raul'