Use memcpy instead of strncpy. It's faster, and isn't a little bitch about overlapping strings.
Working Threads, Conditions and Locks with tests.