Skip to content

Commit 5a0ca3c

Browse files
committed
Try to improve a comment.
1 parent 1939ddb commit 5a0ca3c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/shims/sync.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
350350
// `PTHREAD_MUTEX_NORMAL` type has in some cases different behaviour
351351
// from the default mutex for which the type was not explicitly
352352
// specified. For a more detailed discussion, please see
353-
// https://github.com/rust-lang/miri/issues/1419#.
353+
// https://github.com/rust-lang/miri/issues/1419.
354354
//
355-
// To distinguish these two cases, we do the same trick as glibc: we
356-
// assume that `pthread_mutexattr_settype` is ever called only with
357-
// `PTHREAD_MUTEX_NORMAL` (`PTHREAD_MUTEX_DEFAULT` is the default
358-
// value, so there is no reason to set it explicitly) and to
359-
// distinguish `PTHREAD_MUTEX_NORMAL` from `PTHREAD_MUTEX_DEFAULT`
360-
// once the mutex is constructed, we use this flag.
355+
// To distinguish these two cases in already constructed mutexes, we
356+
// use the same trick as glibc: for the case when
357+
// `pthread_mutexattr_settype` is caled explicitly, we set the
358+
// `PTHREAD_MUTEX_NORMAL_FLAG` flag.
361359
let normal_kind = kind.to_i32()? | PTHREAD_MUTEX_NORMAL_FLAG;
362360
// Check that after setting the flag, the kind is distinguishable
363361
// from all other kinds.

0 commit comments

Comments
 (0)