Purpose
DosQueryThreadAffinity allows a thread to inquire for the current thread's processor affinity mask and the system's capable processor affinity mask.
Syntax
APIRET DosQueryThreadAffinity
Parameters
scope(ULONG) input
AFNTY_THREAD
Returns
ulrc APIRET) returns
DosQueryThreadAffinity returns one of the following values
13
Remarks
DosQueryThreadAffinity allows a thread to ask the Processor Affinity Mask for
Related Functions
Example Code
#define INCL_DOS#define INCL_32
#define INCL_DOSERRORS
#define INCL_NOPMAPI
#include os2.h>
#include stdio.h>
int main(void) {
APIRET rc;
MPAFFINITY affinity;
rc = DosQueryThreadAffinity(AFNTY_SYSTEM, affinity);
printf("Query system's affinity rc = %08.8xh\n",rc);
printf("Query system's affinity affinity[0] = %08.8xh, affinity[1] = %08.8xh\n",
affinity.mask[0], affinity.mask[1]);
return rc;
}