Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
962 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Wraps windows WaitForSingleEvent() calls
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef COMPLETIONEVENT_H
  8. #define COMPLETIONEVENT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // handle to an event
  13. typedef unsigned long EventHandle_t;
  14. // creates an event
  15. EventHandle_t Event_CreateEvent();
  16. // sets the current thread to wait for either the event to be signalled, or the timeout to occur
  17. void Event_WaitForEvent(EventHandle_t event, unsigned long timeoutMilliseconds);
  18. // set the timeout to this for it to never time out
  19. #define TIMEOUT_INFINITE 0xFFFFFFFF
  20. // signals an event to Activate
  21. // Releases one thread waiting on the event.
  22. // If the event has no threads waiting on it, the next thread to wait on it will be let right through
  23. void Event_SignalEvent(EventHandle_t event);
  24. #endif // COMPLETIONEVENT_H