Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::linked_ptr_internal Class Reference

#include <gtest-linked_ptr.h>

Public Member Functions

void join_new ()
 
void join (linked_ptr_internal const *ptr) GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
 
bool depart () GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
 

Detailed Description

Definition at line 89 of file gtest-linked_ptr.h.

Member Function Documentation

◆ depart()

bool testing::internal::linked_ptr_internal::depart ( )
inline

Definition at line 125 of file gtest-linked_ptr.h.

126 {
127 MutexLock lock(&g_linked_ptr_mutex);
128
129 if (next_ == this) return true;
130 linked_ptr_internal const* p = next_;
131 while (p->next_ != this) {
132 assert(p->next_ != next_ &&
133 "Trying to depart() a linked ring we are not in. "
134 "Is GMock thread safety enabled?");
135 p = p->next_;
136 }
137 p->next_ = next_;
138 return false;
139 }
const mie::Vuint & p
Definition bn.cpp:27
GTestMutexLock MutexLock
void lock()
Here is the call graph for this function:

◆ join()

void testing::internal::linked_ptr_internal::join ( linked_ptr_internal const * ptr)
inline

Definition at line 108 of file gtest-linked_ptr.h.

109 {
110 MutexLock lock(&g_linked_ptr_mutex);
111
112 linked_ptr_internal const* p = ptr;
113 while (p->next_ != ptr) {
114 assert(p->next_ != this &&
115 "Trying to join() a linked ring we are already in. "
116 "Is GMock thread safety enabled?");
117 p = p->next_;
118 }
119 p->next_ = this;
120 next_ = ptr;
121 }
Here is the call graph for this function:

◆ join_new()

void testing::internal::linked_ptr_internal::join_new ( )
inline

Definition at line 92 of file gtest-linked_ptr.h.

92 {
93 next_ = this;
94 }

The documentation for this class was generated from the following file: