Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMA TXN broadcasting mechanics fixes #1108

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 36 additions & 9 deletions libskutils/include/skutils/multithreading.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,42 @@ class pthread_recursive_mutex : public basic_pthread_mutex {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

typedef pthread_mutex mutex_type; // typedef std::mutex mutex_type;
// typedef std::lock_guard < mutex_type > lock_type;
// typedef std::unique_lock < mutex_type >
// unique_lock_type;

typedef pthread_recursive_mutex recursive_mutex_type; // typedef std::recursive_mutex
// recursive_mutex_type;
// typedef std::lock_guard < recursive_mutex_type > recursive_lock_type;
// typedef std::unique_lock < recursive_mutex_type > unique_recursive_lock_type;
class standard_mutex : public std::mutex {
public:
standard_mutex() {}
standard_mutex( const char* ) {}
standard_mutex( const std::string& ) {}
standard_mutex( const standard_mutex& ) = delete;
standard_mutex( standard_mutex&& ) = delete;
~standard_mutex() {}
standard_mutex& operator=( const standard_mutex& ) = delete;
standard_mutex& operator=( standard_mutex&& ) = delete;
};

class standard_recursive_mutex : public std::recursive_mutex {
public:
standard_recursive_mutex() {}
standard_recursive_mutex( const char* ) {}
standard_recursive_mutex( const std::string& ) {}
standard_recursive_mutex( const standard_recursive_mutex& ) = delete;
standard_recursive_mutex( standard_recursive_mutex&& ) = delete;
~standard_recursive_mutex() {}
standard_recursive_mutex& operator=( const standard_recursive_mutex& ) = delete;
standard_recursive_mutex& operator=( standard_recursive_mutex&& ) = delete;
};

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// typedef pthread_mutex mutex_type;
typedef standard_mutex mutex_type;
// typedef std::lock_guard < mutex_type > lock_type;
// typedef std::unique_lock < mutex_type > unique_lock_type;

// typedef pthread_recursive_mutex recursive_mutex_type;
typedef standard_recursive_mutex recursive_mutex_type;
// typedef std::lock_guard < recursive_mutex_type > recursive_lock_type;
// typedef std::unique_lock < recursive_mutex_type > unique_recursive_lock_type;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading
Loading