Changeset 9f0b975 for src/benchmark/mutex/pthreads.c
- Timestamp:
- Oct 26, 2017, 4:22:17 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 6a5be52
- Parents:
- f54a0ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/mutex/pthreads.c
rf54a0ab r9f0b975 4 4 #include "bench.h" 5 5 6 volatile unsigned long int counter = 0;7 8 6 pthread_mutex_t mutex; 9 7 10 8 void __attribute__((noinline)) call() { 11 9 pthread_mutex_lock (&mutex); 12 counter++;13 10 pthread_mutex_unlock(&mutex); 14 11 }
Note: See TracChangeset
for help on using the changeset viewer.