Warning C26140
Undefined lock kind 'lock' in annotation 'annotation' on lock 'lock'.
Example
_Has_lock_kind_(MUTEXa) HANDLE gMutex;
struct CorrectExample
{
_Has_lock_kind_(_Lock_kind_mutex_) HANDLE mMutex;
_Guarded_by_(mMutex) int mData;
};
_When_(return == WAIT_OBJECT_0 || return == WAIT_ABANDONED, _Acquires_lock_(gMutex))
DWORD UndefinedLockKind() // Warning C26140
{
DWORD result = WaitForSingleObject(gMutex, 1000);
return result;
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for