AtomicNode.h 443 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "ExtendedAtomicTypes.h"
  3. UNITY_PLATFORM_BEGIN_NAMESPACE;
  4. class AtomicNode
  5. {
  6. friend class AtomicStack;
  7. friend class AtomicQueue;
  8. friend class MutexLockedStack;
  9. friend class MutexLockedQueue;
  10. volatile atomic_word _next;
  11. public:
  12. void* data[3];
  13. AtomicNode *Next() const
  14. {
  15. return (AtomicNode*)_next;
  16. }
  17. AtomicNode *Link(AtomicNode *next);
  18. };
  19. UNITY_PLATFORM_END_NAMESPACE;