Changeset 9f0b975 for src/benchmark/mutex
- 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
- Location:
- src/benchmark/mutex
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/mutex/cfa1.c
rf54a0ab r9f0b975 4 4 #include "bench.h" 5 5 6 volatile unsigned long int counter = 0;7 8 6 monitor M {}; 9 10 void __attribute__((noinline)) call( M & mutex m ) { 11 counter++; 12 } 7 void __attribute__((noinline)) call( M & mutex m ) {} 13 8 14 9 int main(int argc, char* argv[]) { -
src/benchmark/mutex/cfa2.c
rf54a0ab r9f0b975 4 4 #include "bench.h" 5 5 6 volatile unsigned long int counter = 0;7 8 6 monitor M {}; 9 10 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) { 11 counter++; 12 } 7 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {} 13 8 14 9 int main(int argc, char* argv[]) { -
src/benchmark/mutex/cfa4.c
rf54a0ab r9f0b975 4 4 #include "bench.h" 5 5 6 volatile unsigned long int counter = 0;7 6 8 7 monitor M {}; 9 10 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) { 11 counter++; 12 } 8 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) {} 13 9 14 10 int main(int argc, char* argv[]) { -
src/benchmark/mutex/function.c
rf54a0ab r9f0b975 3 3 #include "bench.h" 4 4 5 volatile unsigned long int counter = 0; 6 7 void __attribute__((noinline)) call() { 8 counter++; 9 } 5 void __attribute__((noinline)) call() {} 10 6 11 7 int main(int argc, char* argv[]) { -
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 } -
src/benchmark/mutex/upp.cc
rf54a0ab r9f0b975 3 3 #include "bench.h" 4 4 5 volatile unsigned long int counter = 0;6 7 5 _Monitor MyMonitor { 8 6 public: 9 void __attribute__((noinline)) call() { 10 counter++; 11 } 7 void __attribute__((noinline)) call() {} 12 8 }; 13 9
Note: See TracChangeset
for help on using the changeset viewer.