mutex_linux.inl #1

  • //
  • guest/
  • ShadauxCat/
  • Sprawl/
  • Mainline/
  • threading/
  • mutex_linux.inl
  • View
  • Commits
  • Open Download .zip Download (451 B)
inline void sprawl::threading::Mutex::Lock()
{
	pthread_mutex_lock(&m_mutexImpl);
}

inline bool sprawl::threading::Mutex::TryLock()
{
	return (pthread_mutex_trylock(&m_mutexImpl) == 0);
}

inline void sprawl::threading::Mutex::Unlock()
{
	pthread_mutex_unlock(&m_mutexImpl);
}

inline sprawl::threading::Mutex::Mutex()
	: m_mutexImpl(PTHREAD_MUTEX_INITIALIZER)
{
}

inline sprawl::threading::Mutex::~Mutex()
{
	pthread_mutex_destroy(&m_mutexImpl);
}
# Change User Description Committed
#1 12508 ShadauxCat -Added threading library.
Currently only functional for Linux; Windows will fail to link. (I will fix this soon.)
-Fixed missing move and copy constructors in List and ForwardList
-Fixed broken move constructor in HashMap
-Fixed missing const get() in HashMap
-Fixed broken operator-> in ListIterator
-Added sprawl::noncopyable
-Added sketch headers for filesystem library
-Made StringLiteral hashable, added special hashes for pointers and integers in murmur3
-Fixed compiler warning in async_network
-Updated memory allocators to use new threading library for mutexes
-Added accessibility to sprawl::StringLiteral to be able toa ccess its pointer and length and perform pointer comparisons

#review-12504