Skip to content
Discussion options

You must be logged in to vote

The definitions are close enough that they should effectively be the same.

The intrinsic definition in winnt.h is:

VOID _mm_prefetch(_In_ CHAR CONST *a, _In_ int sel);

The intrinsic definition in xmmintrin.h is:

extern void _mm_prefetch(char const *_A, int _Sel);

The SAL In just gets ignored by the compiler. What's more, a simple:

#include <Windows.h> //Includes winnt.h
#include <intrin.h> //Includes xmmintrin.h

int main()
{
}

compiles with no issue.

So I would seriously suggest looking at CONST. This is defined in minwindef.h as

#ifndef CONST
#define CONST               const
#endif

This makes it the only definition in the Windows headers that can be overridden and changed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bordenc
Comment options

Answer selected by bordenc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants