Re: Robust mutexes implementation

Martin Simmons <[email protected]>
Newsgroups gmane.os.freebsd.devel.threading
Message-ID <[email protected]>
There is a potential bug in enqueue_mutex when it tests m1 == NULL and m1 !=
NULL.  These tests only work because m_lock is the first slot in struct
pthread_mutex and hence 0 in curthread->robust_list is converted to NULL
(rather than a negative value).

Also, is it safe to assume memory ordering between the assignments of
m->m_lock.m_rb_lnk and curthread->robust_list?  Maybe it is OK because the
kernel will never read curthread->robust_list until after the CPU executing
enqueue_mutex has passed a memory barrier?

__Martin
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-threads
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.