POSIX Threads for Windows – REFERENCE - Pthreads-w32

Reference Index

Table of Contents

Name

pthread_win32_test_features_np – find out what features were detected at process attach time.

Synopsis

#include <pthread.h>

BOOL pthread_win32_test_features_np(int mask);

Description

pthread_win32_test_features_np allows an application to check which run-time auto-detected features are available within the library.

The possible features are:

PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE

Return TRUE if the Win32 version of InterlockedCompareExchange() is being used. On IA32 systems the library can use optimised and inlinable assembler versions of InterlockedExchange() and InterlockedCompareExchange().

PTW32_ALERTABLE_ASYNC_CANCEL

Return TRUE if the QueueUserAPCEx package QUSEREX.DLL and the AlertDrv.sys driver was detected. This package provides alertable (pre-emptive) asynchronous threads cancellation. If this feature returns FALSE then the default async cancel scheme is in use, which cannot cancel blocked threads.

Features may be OR'ed into the mask parameter, in which case the routine returns TRUE if any of the OR'ed features would return TRUE. At this stage it doesn't make sense to OR features but it may some day.

Cancellation

None.

Return Value

pthread_win32_test_features_np returns TRUE (non-zero) if any of the specified features is present, and FALSE (0) otherwise.

Errors

None.

Author

Ross Johnson for use with Pthreads-w32.


Table of Contents