ABA.c 213 B

12345678910111213
  1. #include <liblockdep/mutex.h>
  2. void main(void)
  3. {
  4. pthread_mutex_t a, b;
  5. pthread_mutex_init(&a, NULL);
  6. pthread_mutex_init(&b, NULL);
  7. pthread_mutex_lock(&a);
  8. pthread_mutex_lock(&b);
  9. pthread_mutex_lock(&a);
  10. }