Project

General

Profile

Revision 6b036b78

ID6b036b78c349a789c989f9575734ffc2afe16eed

Added by Simon Tenbusch over 9 years ago

- added some debug output
- fixed taskheap: made operators static, otherwise the wrong operators would be used
- fixed t_start assignment in scheduleAt

View differences:

src/sim/ctaskheap.cc
39 39

  
40 40
//==========================================================================
41 41

  
42

  
43
inline int operator <= (cMessage& a, cMessage& b)
42
static inline int operator <= (cMessage& a, cMessage& b)
44 43
{
44
    int r = (a.getTend() < b.getTend()) ? 1 :
45
    (a.getTend() > b.getTend()) ? 0 :
46
     a.taskInsertOrder() <= b.taskInsertOrder();
47
    //printf("a=%f,b=%f,r=%i \n",SIMTIME_DBL(a.getTend()),SIMTIME_DBL(b.getTend()),r);
45 48
  return (a.getTend() < b.getTend()) ? 1 :
46 49
         (a.getTend() > b.getTend()) ? 0 :
47 50
          a.taskInsertOrder() <= b.taskInsertOrder();
48 51
}
49 52

  
50
inline int operator > (cMessage& a, cMessage& b)
53
static inline int operator > (cMessage& a, cMessage& b)
51 54
{
52 55
    return !(a<=b);
53 56
}
......
55 58

  
56 59
static int qsort_cmp_msgs(const void *p1, const void *p2)
57 60
{
61
    printf("test");
58 62
    cMessage *m1 = *(cMessage **)p1;
59 63
    cMessage *m2 = *(cMessage **)p2;
60 64

  

Also available in: Unified diff