Changeset 525b5ef


Ignore:
Timestamp:
Jan 13, 2020, 12:49:14 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
768bd556
Parents:
a21dec4
Message:

add documentation

Location:
benchmark/basic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • benchmark/basic/fetch_add.c

    ra21dec4 r525b5ef  
    22
    33#include "bench.h"
     4
     5// Does a "lock add" on entry and a "lock sub" on exit => 2 atomic instructions making it the most expensive
     6// atomic test.
    47
    58volatile int value;
  • benchmark/basic/tls_fetch_add.c

    ra21dec4 r525b5ef  
    33
    44#include "bench.h"
     5
     6// Does not do a fetch & add. It mimics the cfa protocol to disable interrupts locally, by writing true or false to a
     7// thread_local Boolean. This means the entire protocol is just to "mov" instructions making it extremely cheap.
    58
    69#define thread_local _Thread_local
  • benchmark/basic/ttst_lock.c

    ra21dec4 r525b5ef  
    33
    44#include "bench.h"
     5
     6// Does a "lock xchg" on entry but a simple "mov" on exit => cheaper as 0 contention. While it has much more code, the
     7// bulk is never run.
    58
    69#define CALIGN __attribute__(( aligned (CACHE_ALIGN) ))
Note: See TracChangeset for help on using the changeset viewer.