So, Windows kernel has no return type for its thread functions.
To abstract this, I have a macro, which is for Windows kernel defined like this;
#define LIBSHARED_THREAD_RETURN_TYPE( return_value )
So at the end of the thread function when I come to return, I have this;
return( LIBSHARED_THREAD_RETURN_TYPE(return_value) );
(The type of return_value is “int” for Windows kernel, just so the assignments in the code compile).
So the code ends up post-pre-processor like this;
Which I thought would be fine. Return is not a function call, it’s a keyword, so the brackets just disappear.
Of *COURSE* it doesn’t work.
The compiler doesn’t like it. “error C2059: syntax error : ‘)'”