Hello,
I have read about critical section synchronization primitive in Windows Internals book. On page 194 of the 5the edition, there is written that a critical section can be acquired either in shared or in exclusive mode. This implies to me that it can replace reader-writer locks. However, MSDN tells me that cirtical section can be used only for mutual exclusion purposes. Additionally, I did not see anything about shared/exlusive mode of cirtical sections anywhere, only in the Windows Internals book.
So, my question is: where is the truth? Can critical sections really be acquired in shared and exclusive modes as reader-writer locks do?
Thanks in advance.
I have read about critical section synchronization primitive in Windows Internals book. On page 194 of the 5the edition, there is written that a critical section can be acquired either in shared or in exclusive mode. This implies to me that it can replace reader-writer locks. However, MSDN tells me that cirtical section can be used only for mutual exclusion purposes. Additionally, I did not see anything about shared/exlusive mode of cirtical sections anywhere, only in the Windows Internals book.
So, my question is: where is the truth? Can critical sections really be acquired in shared and exclusive modes as reader-writer locks do?
Thanks in advance.