Add shims for RwLock::try_read/RwLock::try_write

This commit is contained in:
David Cook 2020-01-26 14:25:09 -06:00
parent b1f053764f
commit 46679bc9ef
2 changed files with 4 additions and 0 deletions

View file

@ -271,8 +271,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
| "pthread_mutex_unlock"
| "pthread_mutex_destroy"
| "pthread_rwlock_rdlock"
| "pthread_rwlock_tryrdlock"
| "pthread_rwlock_unlock"
| "pthread_rwlock_wrlock"
| "pthread_rwlock_trywrlock"
| "pthread_rwlock_destroy"
| "pthread_condattr_init"
| "pthread_condattr_setclock"

View file

@ -12,7 +12,9 @@ fn main() {
{
let rw = sync::RwLock::new(0);
drop(rw.read());
drop(rw.try_read());
drop(rw.write());
drop(rw.try_write());
drop(rw);
}
}