- 14 Oct, 2019 1 commit
-
-
Vitali Lovich authored
For Visual Studio we have to wrap the headers with push/pop pragmas at the top and bottom of the file. Define common macros for suppress/unsuppress KJ & the appropriate macros for CAPNP begin/end header wrappers. Because there's a chicken egg problem the KJ_BEGIN_HEADER/CAPNP_BEGIN_HEADER macros are placed below all includes to ensure that the appropriate common.h file has been sourced.
-
- 08 Jul, 2019 3 commits
-
-
Kenton Varda authored
They are more efficient, and self-contained enough not to create trouble. Also, Cygwin's pthread_rwlock implementation appears buggy. I am seeing it allow double locks from time to time.
-
Kenton Varda authored
I observed the cygwin async-xthread-test getting deadlocked here, and noticed the bug. However, the predicate in question was not flappy, so this doesn't really fix async-xthread-test.
-
Kenton Varda authored
-
- 01 Jul, 2019 1 commit
-
-
Kenton Varda authored
This is better than `MutexGuarded<T>::when()` in cases where the caller already has a lock -- `when()` would require unlocking, then immediately locking again (to check the predicate). Possibly `when()` should be removed in favor of `wait()`.
-
- 19 Jun, 2019 1 commit
-
-
Kenton Varda authored
And it turns out that the Windows implementation was returning too early due to rounding error. Fixed.
-
- 17 Jun, 2019 4 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
Gotta admit, Win32's modern synchronization interfaces (introduced with Vista) are beautiful.
-
Kenton Varda authored
I originally left this unimplemented because pthreads annoyingly doesn't support condvar on top of rwlocks. It turns out there's a trick that can be used involving an extra mutex and some redundant locking operations -- the same trick that powers std::condition_variable_any. I used that here. Win32 support will come in a subsequent commit, before merging to master.
-
- 01 Apr, 2019 1 commit
-
-
Kenton Varda authored
This class lets you hold a temporary value that is only safe to access under lock, while you release the lock to do some other work.
-
- 26 Aug, 2018 1 commit
-
-
Kenton Varda authored
-
- 11 Jan, 2018 1 commit
-
-
Kenton Varda authored
@kloepper pointed out a while back that every compiler you've ever heard of supports this. Plus, it's more concise, it's not prone to copy-paste errors, and it looks nicer. At the time I wanted to remain consistent and I didn't feel like spending the time to update all my existing code. But, every time I've added a new header since I've cursed the include guard, so I finally broke down and changed it.
-
- 20 Jul, 2017 1 commit
-
-
Kenton Varda authored
Currently only implemented for Linux (when using futexes), since that's what I use. Will expand to other platforms later.
-
- 30 Mar, 2017 1 commit
-
-
Kenton Varda authored
-
- 22 Nov, 2014 2 commits
-
-
Kenton Varda authored
This prevents the compiler from reporting warnings in these headers while compiling application code. Hopefully this will stem the never-ending stream of complaints from people who enable pedantic warnings.
-
Kenton Varda authored
kernel32.dll and msvcrt.dll are the only remaining dependencies.
-
- 20 Jun, 2014 1 commit
-
-
Kenton Varda authored
For portions currently copyright by Kenton (most of it), transfer copyright to Sandstorm Development Group, Inc. (Kenton's company). The license change is practically meaningless, as MIT and BSD 2-clause are legally equivalent. However, the BSD 2-clause license is sometimes confused for its ugly siblings, BSD 3-clause and BSD 4-clause. The MIT license is more immediately recognizeable for what it is. Rémy Blank and Jason Choy (the two non-trivial contributors) are on record as approving this change: https://groups.google.com/d/msg/capnproto/xXDd2HUOCcc/gbe_COIuXKYJ
-
- 15 Nov, 2013 1 commit
-
-
Kenton Varda authored
-
- 12 Sep, 2013 1 commit
-
-
Kenton Varda authored
-
- 23 Aug, 2013 1 commit
-
-
Kenton Varda authored
Warn when an optimized build doesn't set NDEBUG and then #define it ourselves -- unless the build explicitly sets DEBUG.
-
- 06 Aug, 2013 1 commit
-
-
Kenton Varda authored
Arrange for compiler to send to the code generator the complete contents of all files listed on the command line, all first-level dependencies of those files, and parent scopes of those dependencies, but nothing more. This means it's sometimes possible to compile a schema file without parsing all transitive dependencies. Also, in 'decode' mode, don't compile annotations, so that the files defining those annotations need not be opened at all.
-
- 23 Jul, 2013 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Futex-based mutex and once-init implementations for Linux. These are measurably faster -- and much smaller -- than the pthread-based implementations.
-
- 20 Jul, 2013 1 commit
-
-
Kenton Varda authored
-
- 19 Jul, 2013 1 commit
-
-
Kenton Varda authored
-
- 18 Jul, 2013 3 commits
-
-
Kenton Varda authored
Allow SchemaLoader to use a callback to lazily load schema nodes, including dependencies of loaded nodes.
-
Kenton Varda authored
-
Kenton Varda authored
-
- 17 Jul, 2013 1 commit
-
-
Kenton Varda authored
Implement mutex and once-init synchronization primitives. Wrap pthreads for now, but plan on raw futexes later.
-