<commit_before>#ifndef MUTEXES_H
#define MUTEXES_H

/*
This header file contains "App" versions of the os/thread.hpp
objects.

The "App" versions have the following characteristics:
1.	If you -Dsingle_threaded, they are completely empty and
	will be removed by a sufficiently-smart compiler.
	We even lose the dependency on pthreads, so in theory
	we can still work in an environment without pthreads.
2.	If you decide to launch hl in single-threaded mode, these
	will not bother to do locking, or allocate and create
	lock.
*/

#ifndef single_threaded
	#include"thread.hpp"
	#include<boost/scoped_ptr.hpp>
#endif
#include<boost/noncopyable.hpp>

class AppLock;
class AppTryLock;
class AppCondVar;

class AppMutex : boost::noncopyable {
private:
	#ifndef single_threaded
		boost::scoped_ptr<Mutex> mp;
	#endif
	AppMutex(AppMutex const&) : mp() { }
public:
	AppMutex(void) {<commit_msg>inc/mutexes.hpp: Corrected compilation with -Dsingle_threaded option<commit_after>#ifndef MUTEXES_H
#define MUTEXES_H

/*
This header file contains "App" versions of the os/thread.hpp
objects.

The "App" versions have the following characteristics:
1.	If you -Dsingle_threaded, they are completely empty and
	will be removed by a sufficiently-smart compiler.
	We even lose the dependency on pthreads, so in theory
	we can still work in an environment without pthreads.
2.	If you decide to launch hl in single-threaded mode, these
	will not bother to do locking, or allocate and create
	lock.
*/

#ifndef single_threaded
	#include"thread.hpp"
	#include<boost/scoped_ptr.hpp>
#endif
#include<boost/noncopyable.hpp>

class AppLock;
class AppTryLock;
class AppCondVar;

class AppMutex : boost::noncopyable {
private:
	#ifndef single_threaded
		boost::scoped_ptr<Mutex> mp;
	#endif
	AppMutex(AppMutex const&)
	#ifndef single_threaded
		: mp()
	#endif
	{ }
public:
	AppMutex(void) {
{'fraction_non_alphanumeric': 0.08060182697474476, 'fraction_numerical': 0.0021493820526598604, 'mean_word_length': 4.987138263665595, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2172667', 'n_tokens_mistral': 608, 'n_tokens_neox': 611, 'n_words': 216}