In some cases pthread attrib initialization may fail as
garbare value may indicate that this attribute is already
initialized. Destroy the attr object and recreate it.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Previous implementation was buggy, destroying
resources with pending thread and race conditions.
New version tests basic functionality with 2
threads and basic synchronization.
Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>