Certain pmem package functions such as Get(), Delete() etc. were
accessing appData[] datastructure in a thread-unsafe manner. This is
because these functions used the index returned by exists() after
releasing the lock protecting appData. This commit fixes this issue by
requiring callers of exist() acquire the lock before calling the
function, and releasing it only after the requested operation is
completed.
Certain pmem package functions such as Get(), Delete() etc. were accessing appData[] datastructure in a thread-unsafe manner. This is because these functions used the index returned by exists() after releasing the lock protecting appData. This commit fixes this issue by requiring callers of exist() acquire the lock before calling the function, and releasing it only after the requested operation is completed.
Signed-off-by: Jerrin Shaji George jshajigeorge@vmware.com