Changeset 319e60e in mainline for kernel/test/atomic/atomic1.c


Ignore:
Timestamp:
2006-12-11T18:33:53Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50661ab
Parents:
134877d
Message:

prepare for new test infrastructure

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/test/atomic/atomic1.c

    r134877d r319e60e  
    3232#include <debug.h>
    3333
    34 void test(void)
     34#ifdef CONFIG_BENCH
     35#include <arch/cycle.h>
     36#endif
     37
     38void test_atomic1(void)
    3539{
     40#ifdef CONFIG_BENCH
     41        uint64_t t0 = get_cycle();
     42#endif
    3643        atomic_t a;
    3744
     
    5259        ASSERT(atomic_get(&a) == 10);
    5360
    54         printf("Test passed.\n");       
     61        printf("Test passed.\n");
     62#ifdef CONFIG_BENCH
     63        uint64_t dt = get_cycle() - t0;
     64        printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt);
     65#endif
    5566        return;
    5667}
Note: See TracChangeset for help on using the changeset viewer.