diff options
author | David Robillard <d@drobilla.net> | 2007-07-25 05:01:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-25 05:01:28 +0000 |
commit | 9f43f23510ba2acd8e03f2822d87c74a8774b9d6 (patch) | |
tree | fc29ca27803d92e78f3cfdf9838896351c21c052 /slv2 | |
parent | 092c9d03af043af4bad2d2402ee9c75d68dca67a (diff) | |
download | lilv-9f43f23510ba2acd8e03f2822d87c74a8774b9d6.tar.gz lilv-9f43f23510ba2acd8e03f2822d87c74a8774b9d6.tar.bz2 lilv-9f43f23510ba2acd8e03f2822d87c74a8774b9d6.zip |
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
Diffstat (limited to 'slv2')
-rw-r--r-- | slv2/world.h | 25 |
1 files changed, 25 insertions, 0 deletions
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. * |