common.h 296 B

1234567891011121314
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LIBLOCKDEP_TEST_COMMON_H
  3. #define _LIBLOCKDEP_TEST_COMMON_H
  4. #define LOCK_UNLOCK_2(a, b) \
  5. do { \
  6. pthread_mutex_lock(&(a)); \
  7. pthread_mutex_lock(&(b)); \
  8. pthread_mutex_unlock(&(b)); \
  9. pthread_mutex_unlock(&(a)); \
  10. } while(0)
  11. #endif