@@ -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 {
@@ -384,18 +384,18 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
384
384
385
385
let shared_mode = 0x1 ; // CONDITION_VARIABLE_LOCKMODE_SHARED is not in std
386
386
let mode = if flags == 0 {
387
- RwLockMode :: Exclusive
387
+ RwLockMode :: Write
388
388
} else if flags == shared_mode {
389
- RwLockMode :: Shared
389
+ RwLockMode :: Read
390
390
} else {
391
391
throw_unsup_format ! ( "unsupported `Flags` {flags} in `SleepConditionVariableSRW`" ) ;
392
392
} ;
393
393
394
394
let active_thread = this. get_active_thread ( ) ;
395
395
396
396
let was_locked = match mode {
397
- RwLockMode :: Shared => this. rwlock_reader_unlock ( lock_id, active_thread) ,
398
- RwLockMode :: Exclusive => this. rwlock_writer_unlock ( lock_id, active_thread) ,
397
+ RwLockMode :: Read => this. rwlock_reader_unlock ( lock_id, active_thread) ,
398
+ RwLockMode :: Write => this. rwlock_writer_unlock ( lock_id, active_thread) ,
399
399
} ;
400
400
401
401
if !was_locked {
0 commit comments