@@ -125,7 +125,7 @@ impl<T> ChanOne<T> {
125
125
unsafe {
126
126
127
127
// Install the payload
128
- assert ! ( ( * packet) . payload. is_none( ) ) ;
128
+ rtassert ! ( ( * packet) . payload. is_none( ) ) ;
129
129
( * packet) . payload = Some ( val) ;
130
130
131
131
// Atomically swap out the old state to figure out what
@@ -307,7 +307,7 @@ impl<T> SelectInner for PortOne<T> {
307
307
STATE_ONE => true , // Lost the race. Data available.
308
308
same_ptr => {
309
309
// We successfully unblocked our task pointer.
310
- assert ! ( task_as_state == same_ptr) ;
310
+ rtassert ! ( task_as_state == same_ptr) ;
311
311
let handle = BlockedTask :: cast_from_uint ( task_as_state) ;
312
312
// Because we are already awake, the handle we
313
313
// gave to this port shall already be empty.
@@ -341,7 +341,8 @@ impl<T> SelectPortInner<T> for PortOne<T> {
341
341
unsafe {
342
342
// See corresponding store() above in block_on for rationale.
343
343
// FIXME(#8130) This can happen only in test builds.
344
- assert ! ( ( * packet) . state. load( Relaxed ) == STATE_ONE ) ;
344
+ // This load is not required for correctness and may be compiled out.
345
+ rtassert ! ( ( * packet) . state. load( Relaxed ) == STATE_ONE ) ;
345
346
346
347
let payload = ( * packet) . payload . take ( ) ;
347
348
@@ -387,7 +388,7 @@ impl<T> Drop for ChanOne<T> {
387
388
} ,
388
389
task_as_state => {
389
390
// The port is blocked waiting for a message we will never send. Wake it.
390
- assert ! ( ( * this. packet( ) ) . payload. is_none( ) ) ;
391
+ rtassert ! ( ( * this. packet( ) ) . payload. is_none( ) ) ;
391
392
let recvr = BlockedTask :: cast_from_uint ( task_as_state) ;
392
393
do recvr. wake ( ) . map_move |woken_task| {
393
394
Scheduler :: run_task ( woken_task) ;
0 commit comments