summaryrefslogtreecommitdiff
path: root/tests/mutex3.c
blob: 2bb6106510f6bcb3a74649ea8ebf50dfababeb60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <pthread.h>

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

int
main()
{
  pthread_mutex_lock(&mutex);
  /* do stuff */
  pthread_mutex_unlock(&mutex);
  return 0;
}