ResumeThread

ResumeThread subtracts one from a thread's suspend count. When the suspend count is reduced to zero, the thread's execution is resumed.

Syntax

Copy
DWORD ResumeThread(
    [in]    HANDLE hThread
);

Parameters

[in] hThread

A handle for the thread to be restarted.

Return Value

If the function succeeds, it returns the thread's previous suspend count. If the function fails, it returns 0XFFFFFFFF. Call GetLastError to get extended error information.

Remarks

ResumeThread checks the suspend count of the subject thread. If the suspend count is 0, the thread is not currently suspended and ResumeThread returns 0XFFFFFFFF. Otherwise, the subject thread's suspend count is reduced by one. If the resulting value is 0, then the execution of the subject thread is resumed.

If the return value is 0XFFFFFFFF, the specified thread was not suspended. If the return value is 1, the specified thread was suspended but was restarted. If the return value is greater than 1, the specified thread is still suspended.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

windows.h

wRTOS_rtss.lib

See Also: