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