@param io the context to operate in
@param o the name of the object
@param name the name of the lock
@param cookie user-defined identifier for this instance of the lock
@param tag The tag of the lock
@param desc user-defined lock description
@param duration the duration of the lock. Set to NULL for infinite duration.
@param flags lock flags
@returns 0 on success, negative error code on failure
@returns -EBUSY if the lock is already held by another (client, cookie) pair
@returns -EEXIST if the lock is already held by the same (client, cookie) pair
Take a shared lock on an object.
@param io the context to operate in @param o the name of the object @param name the name of the lock @param cookie user-defined identifier for this instance of the lock @param tag The tag of the lock @param desc user-defined lock description @param duration the duration of the lock. Set to NULL for infinite duration. @param flags lock flags @returns 0 on success, negative error code on failure @returns -EBUSY if the lock is already held by another (client, cookie) pair @returns -EEXIST if the lock is already held by the same (client, cookie) pair