 |
PK_THREAD_unlock_partitions |
|
PK_ERROR_code_t PK_THREAD_unlock_partitions
(
--- received arguments ---
const PK_THREAD_unlock_partitions_o_t *options,
--- returned arguments ---
int *const n_partitions, --- (> 0)
PK_PARTITION_t **const partitions
)
This function unlocks and returns the 'partitions' that were locked to the
calling thread.
Specific Errors:
PK_ERROR_rollback_not_started Partitioned rollback is not active (MILD)
PK_ERROR_not_at_pmark Partition is not at a pmark (MILD)
PK_ERROR_not_locked Thread has no partitions locked (MILD)
PK_ERROR_not_stopped Thread in a chain (MILD)
PK_ERROR_recursion_depth Called within an outer PK or KI function
(MILD)
PK_ERROR_bb_not_empty Bulletin board is not empty (MILD)
After this function has been called, 'partitions' (and items within them) are
no longer only usable in the calling thread. This thread can then use the
same partitions (and items within them) as other threads with no locked
partitions. The global current partition becomes the current partition for
the calling thread and all thread-specific session settings will revert to
their current global values. Any session marks created by this thread since
it locked will be deleted, while any pre-existing ones will become usable
again.
A pre-existing session mark can only be rolled to once all threads that locked
partitions since that mark was created have unlocked their partitions.
If other threads are queuing inside PK_THREAD_lock_partitions for any of the
'partitions', then this function will signal to threads at the front of the
queue that these partitions are now available. This ensures that the queue for
partitions is both fair and efficient.
This function should only be called when partitioned rollback has been started
with PK_DELTA_register_callbacks.