unified lock interface and add spin cond var