diff options
author | Determinant <ted.sybil@gmail.com> | 2018-11-12 15:52:38 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2018-11-12 15:52:38 -0500 |
commit | 7387f7f6b615717dd863bcb62ee7f65ace29879b (patch) | |
tree | 19dfd53b8da5a01858e14fd43184683270deec15 /include/salticidae/type.h | |
parent | dd09443b0b3c0b5d1a8c034644d1065dd25bf5a9 (diff) |
update PeerNetwork to work with multiloops
Diffstat (limited to 'include/salticidae/type.h')
-rw-r--r-- | include/salticidae/type.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/salticidae/type.h b/include/salticidae/type.h index c454265..68deeb0 100644 --- a/include/salticidae/type.h +++ b/include/salticidae/type.h @@ -33,6 +33,7 @@ #include <cstdio> #include <ios> #include <functional> +#include <mutex> namespace salticidae { @@ -40,6 +41,8 @@ const auto _1 = std::placeholders::_1; const auto _2 = std::placeholders::_2; using bytearray_t = std::vector<uint8_t>; +using mutex_lg_t = std::lock_guard<std::mutex>; +using mutex_ul_t = std::unique_lock<std::mutex>; template<typename T> T htole(T) = delete; template<> inline uint16_t htole<uint16_t>(uint16_t x) { return htole16(x); } |