Changeset 15e4e22 for src/benchmark/PthrdCtxSwitch.c
- Timestamp:
- Oct 25, 2017, 1:52:22 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:
- 6395817
- Parents:
- 114014c (diff), f1dd17a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/PthrdCtxSwitch.c
r114014c r15e4e22 1 1 #include <stdio.h> 2 2 #include <stdlib.h> 3 #define _GNU_SOURCE 4 #include < pthread.h>3 4 #include <sched.h> 5 5 6 6 #include "bench.h" … … 12 12 StartTime = Time(); 13 13 for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) { 14 pthread_yield();14 sched_yield(); 15 15 } 16 16 EndTime = Time();
Note: See TracChangeset
for help on using the changeset viewer.