Ignore:
Timestamp:
May 2, 2017, 3:14:19 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
1167cd4, 39c5ea3, 9042795
Parents:
a933dcf4
Message:

Updated the benchmarks to new concurrency syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/benchmark/bench.c

    ra933dcf4 rb510ac2  
    8686//=======================================
    8787
    88 struct CoroutineDummy { coroutine_desc __cor; };
    89 DECL_COROUTINE(CoroutineDummy);
     88coroutine CoroutineDummy {};
    9089void main(CoroutineDummy * this) {}
    9190
     
    117116}
    118117
    119 struct CoroutineResume {
     118coroutine CoroutineResume {
    120119    int N;
    121     coroutine_desc __cor;
    122120};
    123 
    124 DECL_COROUTINE(CoroutineResume);
    125121
    126122void ?{}(CoroutineResume* this, int N) {
     
    150146//=======================================
    151147
    152 struct ThreadDummy { thread_desc __thrd; };
    153 DECL_THREAD(ThreadDummy);
     148thread ThreadDummy {};
    154149void main(ThreadDummy * this) {}
    155150
     
    177172}
    178173
    179 struct ContextSwitch {
     174thread ContextSwitch {
    180175    int N;
    181176    long long result;
    182     thread_desc __thrd;
    183177};
    184 
    185 DECL_THREAD(ContextSwitch);
    186178
    187179void main(ContextSwitch * this) {   
     
    241233        DynamicTaskCreateDelete( NoOfTimes );
    242234        {
    243                 scoped(ContextSwitch) dummy = { (int)NoOfTimes };               // context switch
     235                ContextSwitch dummy = { (int)NoOfTimes };               // context switch
    244236        }
    245237        sout | "\t" | endl;
Note: See TracChangeset for help on using the changeset viewer.