aboutsummaryrefslogtreecommitdiff
path: root/bin/synthpod_bin.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-06-02 10:20:52 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-06-02 10:20:52 +0200
commit5f1ebcef758ca2cce44278980f32fc08ce273f9b (patch)
treef2498bf6835944e07e3b5d2a49ee3471c97cae56 /bin/synthpod_bin.h
parent85dcbd75cd865eae504b260f522e1d9d9d7aac86 (diff)
downloadsynthpod-5f1ebcef758ca2cce44278980f32fc08ce273f9b.tar.xz
migrate to a lock-free pool-based urid allocator.
* it is not yet rt-safe, though.
Diffstat (limited to 'bin/synthpod_bin.h')
-rw-r--r--bin/synthpod_bin.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/synthpod_bin.h b/bin/synthpod_bin.h
index 981cee75..16f68402 100644
--- a/bin/synthpod_bin.h
+++ b/bin/synthpod_bin.h
@@ -43,8 +43,11 @@
#define SEQ_SIZE 0x2000
#define JAN_1970 (uint64_t)0x83aa7e80
+#define URI_POOL_SIZE 0x100000
+#define URI_POOL_MAX 32
typedef enum _save_state_t save_state_t;
+typedef struct _uri_mem_t uri_mem_t;
typedef struct _bin_t bin_t;
enum _save_state_t {
@@ -53,12 +56,20 @@ enum _save_state_t {
SAVE_STATE_JACK
};
+struct _uri_mem_t {
+ atomic_size_t offset;
+ atomic_size_t npools;
+ atomic_uintptr_t pools [URI_POOL_MAX];
+};
+
struct _bin_t {
mapper_t *mapper;
mapper_pool_t mapper_pool;
LV2_URID_Map *map;
LV2_URID_Unmap *unmap;
xpress_map_t xmap;
+
+ uri_mem_t uri_mem;
sp_app_t *app;
sp_app_driver_t app_driver;