I am new to FreeBSD and have a question regarding how pThreads work. Mainly, the m_qe structure within the pthread_mutex_t struct type.
How are the two fields m_qe.tqe_next and m_qe.tqe_prev used and set? The MUTEX_ASSERT_IS_OWNED and MUTEX_ASSERT_IS_NOT_OWNED macros in src/freebsd-c/lib/libthr/thread/thr_mutex.c check these fields to determine if it needs to panic.
Where and how are these two fields used and set?
Thank you.
Code:
m_qe = {
tqe_next = 0x80555d330,
tqe_prev = 0x0
}
How are the two fields m_qe.tqe_next and m_qe.tqe_prev used and set? The MUTEX_ASSERT_IS_OWNED and MUTEX_ASSERT_IS_NOT_OWNED macros in src/freebsd-c/lib/libthr/thread/thr_mutex.c check these fields to determine if it needs to panic.
Where and how are these two fields used and set?
Thank you.