1
0

nxcondition.h 750 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "nx/nxapi.h"
  3. #ifndef WIN32_LEAN_AND_MEAN
  4. #define WIN32_LEAN_AND_MEAN
  5. #endif
  6. #include <windows.h>
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. typedef struct nx_condition_struct_t
  11. {
  12. CONDITION_VARIABLE condition;
  13. CRITICAL_SECTION mutex;
  14. } nx_condition_value_t, *nx_condition_t;
  15. NX_API int NXConditionInitialize(nx_condition_t condition);
  16. NX_API int NXConditionDestroy(nx_condition_t condition);
  17. NX_API int NXConditionLock(nx_condition_t condition);
  18. NX_API int NXConditionUnlock(nx_condition_t condition);
  19. NX_API int NXConditionWait(nx_condition_t condition);
  20. NX_API int NXConditionTimedWait(nx_condition_t condition, unsigned int milliseconds);
  21. NX_API int NXConditionSignal(nx_condition_t condition);
  22. #ifdef __cplusplus
  23. }
  24. #endif