On Tue Mar 28 15:30:27 2023 +0000, Piotr Caban wrote:
It returns true when thread is blocked (is waiting). See following code for an example:
static Context *ctx; static critical_section cs; static DWORD WINAPI lock_thread(void* p) { ctx = p_Context_CurrentContext(); trace("is blocked thread: %d\n", call_func1(p__Context_IsSynchronouslyBlocked, ctx)); call_func1(p_critical_section_lock, &cs) return 0; } int main() { call_func1(p_critical_section_ctor, &cs); call_func1(p_critical_section_lock, &cs) CreateThread(NULL, 0, lock_thread, NULL, NULL, NULL); Sleep(100); trace("is blocked main: %d\n", call_func1(p__Context_IsSynchronouslyBlocked, ctx)); return 0; }
Does this apply only to ConcRT functions or to all blocking functions (e.g. `NtWaitForSingleObject` and/or `RtlWaitOnAddress`)?