summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-20 18:51:33 +0000
committerDavid Robillard <d@drobilla.net>2007-09-20 18:51:33 +0000
commitdf69be82f1cd26fb16d8c35c67ea3accdfb53bfe (patch)
treeb9f422d762ac46272c06333147cb78990b62a615 /src
parent3297e8ba6767ca5dea8d399e8b17bd610fc8bb26 (diff)
downloadlilv-df69be82f1cd26fb16d8c35c67ea3accdfb53bfe.tar.gz
lilv-df69be82f1cd26fb16d8c35c67ea3accdfb53bfe.tar.bz2
lilv-df69be82f1cd26fb16d8c35c67ea3accdfb53bfe.zip
Remove lock stuff I hereby deem not SLV2's problem.
git-svn-id: http://svn.drobilla.net/lad/slv2@741 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/slv2_internal.h11
-rw-r--r--src/world.c67
2 files changed, 0 insertions, 78 deletions
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index bb538f6..d2296cf 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -146,19 +146,8 @@ struct _SLV2World {
librdf_node* lv2_specification_node;
librdf_node* lv2_plugin_node;
librdf_node* rdf_a_node;
-
- void (*rdf_lock)(void*);
- void (*rdf_unlock)(void*);
- void* rdf_lock_data;
- int rdf_lock_count;
};
-void
-slv2_world_lock_if_necessary(SLV2World world);
-
-void
-slv2_world_unlock_if_necessary(SLV2World world);
-
/** Load all bundles found in \a search_path.
*
* \param search_path A colon-delimited list of directories. These directories
diff --git a/src/world.c b/src/world.c
index 11c233d..07f39a5 100644
--- a/src/world.c
+++ b/src/world.c
@@ -73,11 +73,6 @@ slv2_world_new()
world->rdf_a_node = librdf_new_node_from_uri_string(world->world,
(unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
-
- world->rdf_lock = NULL;
- world->rdf_unlock = NULL;
- world->rdf_lock_data = NULL;
- world->rdf_lock_count = 0;
return world;
@@ -129,11 +124,6 @@ slv2_world_new_using_rdf_world(librdf_world* rdf_world)
world->rdf_a_node = librdf_new_node_from_uri_string(rdf_world,
(unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
- world->rdf_lock = NULL;
- world->rdf_unlock = NULL;
- world->rdf_lock_data = NULL;
- world->rdf_lock_count = 0;
-
return world;
fail:
@@ -145,9 +135,6 @@ fail:
void
slv2_world_free(SLV2World world)
{
- if (world->rdf_lock)
- world->rdf_lock(world->rdf_lock_data);
-
librdf_free_node(world->lv2_specification_node);
librdf_free_node(world->lv2_plugin_node);
librdf_free_node(world->rdf_a_node);
@@ -174,63 +161,15 @@ slv2_world_free(SLV2World world)
world->world = NULL;
- if (world->rdf_unlock)
- world->rdf_unlock(world->rdf_lock_data);
-
free(world);
}
-void
-slv2_world_set_rdf_lock_function(SLV2World world, void (*lock)(void*), void* data)
-{
- world->rdf_lock = lock;
- world->rdf_lock_data = data;
-}
-
-
-void
-slv2_world_set_rdf_unlock_function(SLV2World world, void (*unlock)(void*))
-{
- world->rdf_unlock = unlock;
-}
-
-
-void
-slv2_world_lock_if_necessary(SLV2World world)
-{
- if (world->rdf_lock) {
-
- if (world->rdf_lock_count == 0)
- world->rdf_lock(world->rdf_lock_data);
-
- ++world->rdf_lock_count;
-
- }
-}
-
-
-void
-slv2_world_unlock_if_necessary(SLV2World world)
-{
- if (world->rdf_lock && world->rdf_lock_count > 0) {
-
- if (world->rdf_lock_count == 1 && world->rdf_unlock)
- world->rdf_unlock(world->rdf_lock_data);
-
- world->rdf_lock_count = 0;
-
- }
-}
-
-
/** Load the entire contents of a file into the world model.
*/
void
slv2_world_load_file(SLV2World world, librdf_uri* file_uri)
{
- slv2_world_lock_if_necessary(world);
-
librdf_storage* storage = librdf_new_storage(world->world,
"memory", NULL, NULL);
librdf_model* model = librdf_new_model(world->world,
@@ -244,8 +183,6 @@ slv2_world_load_file(SLV2World world, librdf_uri* file_uri)
librdf_free_model(model);
librdf_free_storage(storage);
-
- slv2_world_unlock_if_necessary(world);
}
@@ -253,8 +190,6 @@ slv2_world_load_file(SLV2World world, librdf_uri* file_uri)
void
slv2_world_load_bundle(SLV2World world, const char* bundle_uri_str)
{
- slv2_world_lock_if_necessary(world);
-
librdf_uri* bundle_uri = librdf_new_uri(world->world,
(const unsigned char*)bundle_uri_str);
@@ -345,8 +280,6 @@ slv2_world_load_bundle(SLV2World world, const char* bundle_uri_str)
librdf_free_storage(manifest_storage);
librdf_free_uri(manifest_uri);
librdf_free_uri(bundle_uri);
-
- slv2_world_unlock_if_necessary(world);
}