Commit Graph

85 Commits (593105a70b0787ca3af1f221c288b98781c520a5)

Author SHA1 Message Date
Jason Rhinelander 76608b6b90 Logic simplification 4 years ago
Jason Rhinelander f1aa27e616 fix speeling mistack 4 years ago
Jeff Becker bf0416cab8
remove Time_t, add operator overload for printing llarp_time_t and add to_json function for serializing llarp_time_t to json 4 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 4 years ago
Jason Rhinelander b4440094b0 De-abseil, part 2: mutex, locks, (most) time
- util::Mutex is now a std::shared_timed_mutex, which is capable of
  exclusive and shared locks.

- util::Lock is still present as a std::lock_guard<util::Mutex>.

- the locking annotations are preserved, but updated to the latest
  supported by clang rather than using abseil's older/deprecated ones.

- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
  locks anymore (WTF abseil).

- ReleasableLock is gone.  Instead there are now some llarp::util helper
  methods to obtain unique and/or shared locks:
    - `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
      unlockable object (std::unique_lock<T>, with T inferred from
      `mutex`).
    - `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
      "reader") lock of the mutex.
    - `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
      used to atomically lock multiple mutexes at once (returning a
      tuple of the locks).
  This are templated on the mutex which makes them a bit more flexible
  than using a concrete type: they can be used for any type of lockable
  mutex, not only util::Mutex.  (Some of the code here uses them for
  getting locks around a std::mutex).  Until C++17, using the RAII types
  is painfully verbose:

  ```C++
  // pre-C++17 - needing to figure out the mutex type here is annoying:
  std::unique_lock<util::Mutex> lock(mutex);
  // pre-C++17 and even more verbose (but at least the type isn't needed):
  std::unique_lock<decltype(mutex)> lock(mutex);
  // our compromise:
  auto lock = util::unique_lock(mutex);
  // C++17:
  std::unique_lock lock(mutex);
  ```

  All of these functions will also warn (under gcc or clang) if you
  discard the return value.  You can also do fancy things like
  `auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
  lock take over an already-locked mutex).

- metrics code is gone, which also removes a big pile of code that was
  only used by metrics:
  - llarp::util::Scheduler
  - llarp:🧵:TimerQueue
  - llarp::util::Stopwatch
4 years ago
Stephen Shelton ea97a8f2ac
Make format 4 years ago
Thomas Winget fae86281e9 make path short name look nicer 4 years ago
Thomas Winget 74d421ac2d PathBuildNumber -> NextPathBuildNumber because increment side-effect 4 years ago
Thomas Winget 893ef2b874 const-y-ness and move-y-ness 4 years ago
Thomas Winget fc56a018e5 path builder prints hops, rest print short name 4 years ago
Jeff Becker 499e346da6
notify delivery of path builds 4 years ago
Jeff Becker 56dce90de9
add trace log level for tracking logic thread jobs 5 years ago
Thomas Winget ef1a5652ef
remove our paths from outbound queues 5 years ago
Jeff Becker 7ee026fa50
make path builds work again 5 years ago
jeff 14c9ef15ed try calling stuff in logic thread from event loop 5 years ago
Jeff Becker bcf9135da6
testnet 5 years ago
Jeff Becker 1adae338ce
Merge remote-tracking branch 'origin/master' 5 years ago
Michael edd0ec398f
Move thread stuff to subdirectory 5 years ago
Michael 4d8fe2a8a8
Move meta programming to subdirectory 5 years ago
Jeff Becker c01112e4b7
tracy lock contention testing and other fun things 5 years ago
Michael 094b697b01
Replace StatusObject with underlying JSON type 5 years ago
Michael a270fe5f33
fixup! Fix gcc trunk warnings 5 years ago
Michael f9e9227e19
Fix gcc trunk warnings 5 years ago
Jeff Becker aa0a795689
call path build fail stuff in logic thread 5 years ago
Jeff Becker 60fbeca9d4
const correctness 5 years ago
Jeff Becker db2206664a
fix crashes in testnet 5 years ago
Jeff Becker f48754c45d
make hop count and length configurable 5 years ago
Jeff Becker b9bcc2b775
make threadpool consice 5 years ago
Jeff Becker d6ec528a72
start work on seperating ips out of endpoint 5 years ago
Jeff Becker 64e9622270
start seperating tun and endpoint 5 years ago
Michael b6b400baef
Tidy up pathbuilder code 5 years ago
Michael b89689fec3
Refactor path build code 5 years ago
Jeff 674f272a46
Merge pull request #630 from majestrate/master
recent stability stuff
5 years ago
Michael 491fee206b
Port code to use CryptoManager over passing Crypto pointers 5 years ago
Jeff Becker 068fec82fb
set lifetime of paths 5 years ago
Jeff Becker 64c7ed42fc
make format 5 years ago
Jeff Becker 9c96aecf3f
move llarp::Logic to std::shared_ptr
add sequence numbers to HSD messages

begin work on network isolation code

add more docs
5 years ago
Michael dd8a93a400
Apply rule of zero to code base 5 years ago
Jeff Becker a4e90ee769
hax to make it work. 5 years ago
Jeff Becker d3a98db267
don't resize frames 5 years ago
Jeff Becker 486042511c
log hops 5 years ago
Jeff Becker 540c2e1666
fix previous commit 5 years ago
Jeff Becker df322e1149
don't include duplicate hops in paths 5 years ago
Jeff Becker b68f539de6
limit outbound connections 5 years ago
Jeff Becker 7b03b63d13
more sighup code 5 years ago
Jeff Becker a53da68700
start work on sighup 5 years ago
Jeff Becker 61d42811be
prevent crash 5 years ago
Jeff Becker 34533db620
add urgent build that builds over an existing path for an endpoint 5 years ago
Jeff Becker b9adf90fb9
remove random timer fuzz 5 years ago
Jeff Becker 6c17bf35b3
decrease minimum path build interval 5 years ago