
initialise a barrier with zero count
---Thread-Announcement------------------------------------------

Thread #x is the program's root thread

----------------------------------------------------------------

Thread #x: pthread_barrier_init: 'count' argument is zero
   at 0x........: pthread_barrier_init (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:39)

----------------------------------------------------------------

Thread #x's call to pthread_barrier_init failed
   with error code 22 (EINVAL: Invalid argument)
   at 0x........: pthread_barrier_init (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:39)


initialise a barrier twice
----------------------------------------------------------------

Thread #x: pthread_barrier_init: barrier is already initialised
   at 0x........: pthread_barrier_init (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:45)


initialise a barrier which has threads waiting on it
----------------------------------------------------------------

Thread #x: pthread_barrier_init: barrier is already initialised
   at 0x........: pthread_barrier_init (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:57)

----------------------------------------------------------------

Thread #x: pthread_barrier_init: threads are waiting at barrier
   at 0x........: pthread_barrier_init (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:57)


destroy a barrier that has waiting threads
----------------------------------------------------------------

Thread #x: pthread_barrier_destroy: threads are waiting at barrier
   at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:69)

----------------------------------------------------------------

Thread #x's call to pthread_barrier_destroy failed
   with error code 16 (EBUSY: Device or resource busy)
   at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:69)


destroy a barrier that was never initialised
----------------------------------------------------------------

Thread #x: pthread_barrier_destroy: barrier was never initialised
   at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
   by 0x........: main (bar_bad.c:80)

