Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/sched-int-block.c

    r83a071f9 r9fe39530  
     1//---------------------------------------------------------
     2// Barging test
     3// Ensures that no barging can occur between :
     4//   - the frontend of the signal_block and the signaled thread
     5//   - the signaled  threadand the backend of the signal_block
     6//---------------------------------------------------------
     7
     8
    19#include <fstream>
    210#include <kernel>
     
    513#include <thread>
    614
    7 #ifndef N
    8 #define N 10_000
     15#include <time.h>
     16
     17static const unsigned long N = 5_000ul;
     18
     19#ifndef PREEMPTION_RATE
     20#define PREEMPTION_RATE 10_000ul
    921#endif
     22
     23unsigned int default_preemption() {
     24        return PREEMPTION_RATE;
     25}
    1026
    1127enum state_t { WAITED, SIGNAL, BARGE };
     
    102118
    103119int main(int argc, char* argv[]) {
    104         rand48seed(0);
     120        rand48seed( time( NULL ) );
    105121        done = false;
    106122        processor p;
Note: See TracChangeset for help on using the changeset viewer.