generic interface and locking-callbacks
The generic interface has to provide the registration of two additional callbacks for lock and unlock critical operation when using multiple threads with shared memory.
The callback has to be passed into the sion_generic_create_api function call, because this function performs already a critical operation (sid).
This can be done without changing existing API by defining a new function sion_generic_create_api_r(name, lock_cb, unlock_cb, parm)