TODO: get barrier class licensing info
Resolved thread syncing errors

barrier_wait actually returns a value of -1 if all threads
have sync-ed successfully. Previously performMix() was handling all
non-zero return values as errors.