- 15 Nov, 2018 4 commits
-
-
Dan Melnic authored
Summary: LockFreeRingBuffer: allow writing different data types Reviewed By: djwatson Differential Revision: D13066863 fbshipit-source-id: 7963e3da6daa9d1eff80e7642f0b6c773acc4856
-
Orvid King authored
Summary: We have the ability to support this rather odd combination of flags, so do it. Reviewed By: yfeldblum Differential Revision: D13067516 fbshipit-source-id: b0006a995ef614253440820e029f66288b557c37
-
Andrew Gallagher authored
Summary: Named namespaces inside unnamed namespaces conflict when they cross module boundaries (https://bugs.llvm.org/show_bug.cgi?id=39644). Reviewed By: yfeldblum Differential Revision: D13056637 fbshipit-source-id: 2ecf2360bbb3b6e7a3cf72ca20e38d7b940e694a
-
Andrew Gallagher authored
Summary: This is meant to be included by other rules, so don't use the `-inl.h` suffix which is reserved for rule-private headers. Reviewed By: yfeldblum Differential Revision: D13056539 fbshipit-source-id: 5c36d4473f041f5e8dea9458fc12f71e1e9ac613
-
- 14 Nov, 2018 6 commits
-
-
Maged Michael authored
Summary: Add batches and tags for objects protectable by hazard pointers. Add fine-grained cleanup of tagged objects (lower overhead than calling hazptr_cleanup). Design sketch: - The domain structure contains an untagged list and one or more tagged lists (more than one to reduce contention). - These domain lists support lock-free push and lock-free unlocked pop all. Tagged lists are locked by pop all operations and unlocked by push_unlock operations. Push operations are lock-free even when a list is locked for pop all operations. - Batches are lists of retired objects. - Each object contains the address of a batch (or null). The lowest bit indicates if the batch address is used also as a tag. - hazptr_cleanup_batch_tag(tag) reclaims all objects with that tag without checking hazard pointers. - All objects in a domain tagged list contain tagged objects that hash to the index of the list. - Untagged object are those that are safe to reclaim at shutdown time, i.e., their deleter only reclaims memory without other dependencies. - For example, retired UnboundedQueue segments do not depend on user-defined destructors and their deleters merely reclaim memory using the default deleter, and therefore can be untagged. - On the other hand, the deleters of ConcurrentHashMap buckets and nodes depend on user-defined code and therefore their destruction must be managed explicitly. Therefore they are tagged. - Batches can be used even without tagging. For example retired UnboundedQueue segments are collected in batches because they have link-counting interdependencies and batches help keep related segments together. Reviewed By: davidtgoldblatt Differential Revision: D10147101 fbshipit-source-id: 8820cf46ad8942c7362d91543bfbd9fe07e27b7a
-
Mingtao Yang authored
Summary: SSLContext::loadCertificate() loads a certificate chain with SSL_CTX_use_certificate_chain_file. A method named SSLContext::loadCertificateFromBufferPEM() should have the same semantics. Reviewed By: yfeldblum Differential Revision: D13037752 fbshipit-source-id: da7b150065d2207421c6bba86d44ce5e2c57e1a9
-
Lee Howes authored
Summary: Splits folly::futures::map over forms that take value continuations and try continuations. This allows the implementation to call Future::thenValue and Future::thenTry correctly. Reviewed By: yfeldblum Differential Revision: D10861465 fbshipit-source-id: 31044127f43e574edcc01c6bb173ecc4f0c9c90e
-
Yiding Jia authored
Summary: Avoid create StringViewType if value_type is not POD, as with libc++ there is a static_assert in the class body which seems to fail. Reviewed By: yfeldblum Differential Revision: D13015696 fbshipit-source-id: 090e5cd3f5e21aa8c22ea893e894b38fd3d2a745
-
Andrew Gallagher authored
Reviewed By: yfeldblum Differential Revision: D13056552 fbshipit-source-id: 910296cda7d392972a48c8fa3e425b4bdeaa5d26
-
Yedidya Feldblum authored
Summary: [Folly] Move `asm_rdtsc` to its own header and rename to `hardware_timestamp`. Reviewed By: aary, Orvid Differential Revision: D10368436 fbshipit-source-id: 88a6d1d50702e80fb3ebba5035116850c49df6ea
-
- 13 Nov, 2018 6 commits
-
-
Orvid King authored
Summary: It's no longer needed Reviewed By: yfeldblum Differential Revision: D13037827 fbshipit-source-id: b5719bf302eb47f3d0c2620b45520e3f7300bd43
-
Orvid King authored
Summary: It's using `__sync_fetch_and_add`, so include the right portability header. Reviewed By: yfeldblum Differential Revision: D13037888 fbshipit-source-id: 72b209abcf4180cd480be99be20893f74f181e83
-
Orvid King authored
Summary: More porting. Reviewed By: yfeldblum Differential Revision: D12892420 fbshipit-source-id: 6f92eb7922a9cfdee3bb412aa171fea8d4627617
-
Orvid King authored
Summary: Shift the tests as well. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D12981653 fbshipit-source-id: 0fda732df3882218746c173c885bff06b86abbac
-
Orvid King authored
Summary: The end. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D12878966 fbshipit-source-id: 23cf64b9f66560ddeb87631f5ab955334944ea55
-
Orvid King authored
Summary: Do it. Reviewed By: yfeldblum Differential Revision: D12988464 fbshipit-source-id: b5dd907f24f9064ea7c7e417e0616120339eb452
-
- 12 Nov, 2018 12 commits
-
-
Orvid King authored
Summary: Convert the tests as well Reviewed By: yfeldblum Differential Revision: D12981682 fbshipit-source-id: b07567802c4ddba0e0d1fbab7ea021b9ea948c42
-
Orvid King authored
Summary: Port more things over. Reviewed By: yfeldblum Differential Revision: D12989142 fbshipit-source-id: 6066978e42080748658cbe6ff94034037af2c656
-
Orvid King authored
Summary: More! Reviewed By: yfeldblum Differential Revision: D12818656 fbshipit-source-id: acb269258524ae22bf8761407713b89cf3d57a3a
-
Orvid King authored
Summary: More things. Reviewed By: yfeldblum Differential Revision: D12818556 fbshipit-source-id: 8e839489eb92a3ec3f0ac391c157ad3de42d596b
-
Orvid King authored
Summary: Just keep porting, just keep porting. Reviewed By: yfeldblum Differential Revision: D12818498 fbshipit-source-id: 48d404ed17caa79c241e2facc1a3d93715ce02cb
-
Orvid King authored
Summary: This is a big one, but adds support for NetworkSocket to AsyncSocket itself. Reviewed By: yfeldblum Differential Revision: D12818493 fbshipit-source-id: d7b73f356414b006f4fc6b1c380a8fa1c32b9a46
-
Orvid King authored
Summary: More support infrastructure. Reviewed By: yfeldblum Differential Revision: D12818441 fbshipit-source-id: b6d3a276ea332eccf8c6f43484fd25ec543bcc08
-
Orvid King authored
Summary: More support means more diffs, as many small ones as possible. Reviewed By: yfeldblum Differential Revision: D12818383 fbshipit-source-id: be364e01d8d6d7b7419a2fc870c93dafcba5d2b1
-
Orvid King authored
Summary: More places supporting NetworkSocket. Reviewed By: yfeldblum Differential Revision: D12818369 fbshipit-source-id: 6ee0ce2dde3283ea7fd8f657329dc55c78c90714
-
Kirk Shoop authored
Summary: discovered that trailing single-line comment token will force clang-format to keep a new-line. used this and clang format to get some of the files clang-format clean while still being more-or-less readable Reviewed By: yfeldblum Differential Revision: D13016291 fbshipit-source-id: 0c3428e52f3366d9d90b32a551d8853d163b8298
-
Kirk Shoop authored
Summary: used the wrong Concept to constrain the receiver CTAD for a value function. Reviewed By: yfeldblum Differential Revision: D13027571 fbshipit-source-id: 5478afbb10c5145960cc6107c173da2bf241b9bc
-
Matt Glazar authored
Summary: When the PCHECK for read() in Random::secureRandom fails, the message is often misleading. In the following case, bytesRead != size caused the assertion failure. Unfortunately, the message includes an unrelated error message ("No such file or directory"), which can throw people off: F1031 13:15:26.997059 270573 Random.cpp:69] Check failed: bytesRead >= 0 && size_t(bytesRead) == size : No such file or directory [2] Improve the message by splitting the PCHECK into a PCHECK (for the read() error) and a CHECK_EQ (for the logic error): F1108 17:33:31.771008 3185333 Random.cpp:70] Check failed: size_t(bytesRead) == size (112960 vs. 1048576) Reviewed By: yfeldblum, simpkins Differential Revision: D12856276 fbshipit-source-id: fe9067972db805a54f2cc290aab11bac425601ef
-
- 11 Nov, 2018 2 commits
-
-
Orvid King authored
Summary: As per https://github.com/facebook/folly/issues/961, it appears that Apple Clang takes issue with modifying const values in the constructor within a constexpr context. Reviewed By: yfeldblum Differential Revision: D13005049 fbshipit-source-id: b0c9efcb6c5c4667028a7e0948e2fac53afdb1d2
-
Orvid King authored
Summary: I missed a use of file descriptors in the last diff to clean up this test. Reviewed By: yfeldblum Differential Revision: D12990054 fbshipit-source-id: 433f5b624eaa5b4fb8b757ba0b503354d5da0623
-
- 09 Nov, 2018 5 commits
-
-
Andrii Grynenko authored
Summary: The lambda that gets the ctx moved in can be created before the via call. (Note: this ignores all push blocking failures!) Reviewed By: spalamarchuk Differential Revision: D13009656 fbshipit-source-id: 1c89905e544adc829124277465c32958a3489845
-
Yunus Rahbar authored
Reviewed By: simpkins Differential Revision: D12990230 fbshipit-source-id: 58d82299a8fe6aed75115008fe5dfb0f46d847c6
-
Andrii Grynenko authored
Summary: This makes it work for SemiFutures with deferred work. Reviewed By: yfeldblum Differential Revision: D12982589 fbshipit-source-id: 9dcd130c72e8df67e8b4773b228041f96da06b10
-
Chad Austin authored
Summary: dschatzberg and I used `folly::CachelinePadded` when `alignas(folly::hardware_destructive_interference_size)` would have sufficed. Add a comment clarifying when CachelinePadded is appropriate. Reviewed By: yfeldblum Differential Revision: D12970571 fbshipit-source-id: 7d9193358a7b1aec78c95b715641396474eaebcf
-
Dan Shiovitz authored
Summary: Seems reasonable to overload IOBufHash/Compare to support pointers, since they already take unique_ptrs. Reviewed By: yfeldblum Differential Revision: D12963089 fbshipit-source-id: 85124939cef7a18bfd02aeff392732fb93691903
-
- 08 Nov, 2018 5 commits
-
-
Andrii Grynenko authored
Summary: We want to have a guarantee that if f1() was run before f2(), then all writes done by f1() are also observable by f2(). Reviewed By: yfeldblum, davidtgoldblatt Differential Revision: D12982731 fbshipit-source-id: 2170e977a879d27d2daf1b5307441594e6aae00b
-
Shiva Shankar P authored
Summary: In most cases, it would be incorrect to discard the guard immediately after its creation. Reviewed By: yfeldblum Differential Revision: D12911100 fbshipit-source-id: cb11b01e2d246a5d0b6bb0031968551796e25abf
-
Andrii Grynenko authored
Reviewed By: William-J-Earl Differential Revision: D12982874 fbshipit-source-id: cc8d3a03896386f03df1c6720be312b2700e8fb3
-
Giuseppe Ottaviano authored
Reviewed By: nbronson Differential Revision: D12973004 fbshipit-source-id: 46de0c9ef6760a412fd2753595480ecd7e0be678
-
Orvid King authored
Summary: Port it away from raw file descriptors. Reviewed By: yfeldblum Differential Revision: D12908626 fbshipit-source-id: 2448c2bfb226dba9de4baa77439c6644b09284a4
-