add lock_shared2 with duration and flags for LockingDurPP