- File:
-
- 1 edited
-
libcfa/src/concurrency/ready_subqueue.hfa (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/ready_subqueue.hfa
ref94ae7 r353aaba 32 32 this.prev = mock_head(this); 33 33 this.anchor.next = 0p; 34 this.anchor.ts = -1llu;34 this.anchor.ts = 0; 35 35 #if !defined(__CFA_NO_STATISTICS__) 36 36 this.cnt = 0; … … 44 44 /* paranoid */ verify( &mock_head(this)->link.ts == &this.anchor.ts ); 45 45 /* paranoid */ verify( mock_head(this)->link.next == 0p ); 46 /* paranoid */ verify( mock_head(this)->link.ts == -1llu);46 /* paranoid */ verify( mock_head(this)->link.ts == 0 ); 47 47 /* paranoid */ verify( mock_head(this) == this.prev ); 48 48 /* paranoid */ verify( __alignof__(__intrusive_lane_t) == 128 ); … … 55 55 // Make sure the list is empty 56 56 /* paranoid */ verify( this.anchor.next == 0p ); 57 /* paranoid */ verify( this.anchor.ts == -1llu);57 /* paranoid */ verify( this.anchor.ts == 0 ); 58 58 /* paranoid */ verify( mock_head(this) == this.prev ); 59 59 } … … 64 64 /* paranoid */ verify( this.lock ); 65 65 /* paranoid */ verify( node->link.next == 0p ); 66 /* paranoid */ verify( node->link.ts == -1llu);66 /* paranoid */ verify( node->link.ts == 0 ); 67 67 /* paranoid */ verify( this.prev->link.next == 0p ); 68 /* paranoid */ verify( this.prev->link.ts == -1llu);68 /* paranoid */ verify( this.prev->link.ts == 0 ); 69 69 if( this.anchor.next == 0p ) { 70 70 /* paranoid */ verify( this.anchor.next == 0p ); 71 /* paranoid */ verify( this.anchor.ts == -1llu ); 72 /* paranoid */ verify( this.anchor.ts != 0 ); 71 /* paranoid */ verify( this.anchor.ts == 0 ); 73 72 /* paranoid */ verify( this.prev == mock_head( this ) ); 74 73 } else { 75 74 /* paranoid */ verify( this.anchor.next != 0p ); 76 /* paranoid */ verify( this.anchor.ts != -1llu );77 75 /* paranoid */ verify( this.anchor.ts != 0 ); 78 76 /* paranoid */ verify( this.prev != mock_head( this ) ); … … 94 92 /* paranoid */ verify( this.lock ); 95 93 /* paranoid */ verify( this.anchor.next != 0p ); 96 /* paranoid */ verify( this.anchor.ts != -1llu );97 94 /* paranoid */ verify( this.anchor.ts != 0 ); 98 95 … … 102 99 this.anchor.next = node->link.next; 103 100 this.anchor.ts = node->link.ts; 104 bool is_empty = this.anchor. next == 0p;101 bool is_empty = this.anchor.ts == 0; 105 102 node->link.next = 0p; 106 node->link.ts = -1llu;103 node->link.ts = 0; 107 104 #if !defined(__CFA_NO_STATISTICS__) 108 105 this.cnt--; … … 113 110 114 111 /* paranoid */ verify( node->link.next == 0p ); 115 /* paranoid */ verify( node->link.ts == -1llu ); 116 /* paranoid */ verify( node->link.ts != 0 ); 117 /* paranoid */ verify( this.anchor.ts != 0 ); 112 /* paranoid */ verify( node->link.ts == 0 ); 118 113 return [node, ts]; 119 114 } … … 121 116 // Check whether or not list is empty 122 117 static inline bool is_empty(__intrusive_lane_t & this) { 123 return this.anchor. next == 0p;118 return this.anchor.ts == 0; 124 119 } 125 120 … … 127 122 static inline unsigned long long ts(__intrusive_lane_t & this) { 128 123 // Cannot verify here since it may not be locked 129 /* paranoid */ verify(this.anchor.ts != 0);130 124 return this.anchor.ts; 131 125 }
Note:
See TracChangeset
for help on using the changeset viewer.