lockfree: merge changes from trunk