@@ -25,13 +25,13 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
25
25
this. unblock_thread ( thread) ;
26
26
27
27
match mode {
28
- RwLockMode :: Shared =>
28
+ RwLockMode :: Read =>
29
29
if this. rwlock_is_write_locked ( lock) {
30
30
this. rwlock_enqueue_and_block_reader ( lock, thread) ;
31
31
} else {
32
32
this. rwlock_reader_lock ( lock, thread) ;
33
33
} ,
34
- RwLockMode :: Exclusive =>
34
+ RwLockMode :: Write =>
35
35
if this. rwlock_is_locked ( lock) {
36
36
this. rwlock_enqueue_and_block_writer ( lock, thread) ;
37
37
} else {
@@ -386,18 +386,18 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
386
386
387
387
let shared_mode = 0x1 ; // CONDITION_VARIABLE_LOCKMODE_SHARED is not in std
388
388
let mode = if flags == 0 {
389
- RwLockMode :: Exclusive
389
+ RwLockMode :: Write
390
390
} else if flags == shared_mode {
391
- RwLockMode :: Shared
391
+ RwLockMode :: Read
392
392
} else {
393
393
throw_unsup_format ! ( "unsupported `Flags` {flags} in `SleepConditionVariableSRW`" ) ;
394
394
} ;
395
395
396
396
let active_thread = this. get_active_thread ( ) ;
397
397
398
398
let was_locked = match mode {
399
- RwLockMode :: Shared => this. rwlock_reader_unlock ( lock_id, active_thread) ,
400
- RwLockMode :: Exclusive => this. rwlock_writer_unlock ( lock_id, active_thread) ,
399
+ RwLockMode :: Read => this. rwlock_reader_unlock ( lock_id, active_thread) ,
400
+ RwLockMode :: Write => this. rwlock_writer_unlock ( lock_id, active_thread) ,
401
401
} ;
402
402
403
403
if !was_locked {
0 commit comments