Changeset 15e4e22


Ignore:
Timestamp:
Oct 25, 2017, 1:52:22 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, 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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Location:
src/benchmark
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/benchmark/CorCtxSwitch.c

    r114014c r15e4e22  
    77coroutine GreatSuspender {};
    88
    9 void ?{}( GreatSuspender * this ) {
     9void ?{}( GreatSuspender & this ) {
    1010        prime(this);
    1111}
    1212
    13 void main( GreatSuspender * this )
     13void main( GreatSuspender & this )
    1414{
    1515        while( true ) {
     
    1818}
    1919
    20 void resumer( GreatSuspender * this, const unsigned int NoOfTimes ) {
     20void resumer( GreatSuspender & this, const unsigned int NoOfTimes ) {
    2121        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    2222                resume( this );
     
    3131
    3232        StartTime = Time();
    33         resumer( &s, NoOfTimes );
     33        resumer( s, NoOfTimes );
    3434        EndTime = Time();
    3535
  • src/benchmark/PthrdCtxSwitch.c

    r114014c r15e4e22  
    11#include <stdio.h>
    22#include <stdlib.h>
    3 #define _GNU_SOURCE
    4 #include <pthread.h>
     3
     4#include <sched.h>
    55
    66#include "bench.h"
     
    1212        StartTime = Time();
    1313        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    14                 pthread_yield();
     14                sched_yield();
    1515        }
    1616        EndTime = Time();
Note: See TracChangeset for help on using the changeset viewer.