From 9f43f23510ba2acd8e03f2822d87c74a8774b9d6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 25 Jul 2007 05:01:28 +0000 Subject: Start work on lock stuff, for threadsafe SLV2 and using SLV2 with apps that use Redland themselves. git-svn-id: http://svn.drobilla.net/lad/slv2@621 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/world.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'slv2/world.h') diff --git a/slv2/world.h b/slv2/world.h index e4e135d..a133010 100644 --- a/slv2/world.h +++ b/slv2/world.h @@ -70,6 +70,31 @@ slv2_world_new_using_rdf_world(librdf_world* world); void slv2_world_free(SLV2World world); +#if 0 +/** Set the RDF lock function. + * + * If set, this function will be called before any calls to librdf functions. + * This can be used to make SLV2 thread-safe. + * + * \a lock will be called with \a data as a parameter, whenever SLV2 is going + * to perform an RDF operation. + */ +void +slv2_world_set_rdf_lock_function(SLV2World world, void (*lock)(void*), void* data); + + +/** Set the unlock function. + * + * This is the counterpart to the RDF lock function set with + * slv2_world_set_rdf_lock_function. Be sure to call this after locking, + * or a deadlock will occur. + * + * \a unlock will be called with the same data pointer set with + * slv2_world_set_rdf_lock_function. + */ +void +slv2_world_set_rdf_unlock_function(SLV2World world, void (*unlock)(void*)); +#endif /** Load all installed LV2 bundles on the system. * -- cgit v1.2.1