1. 17 Nov, 2018 6 commits
    • Orvid King's avatar
      Remove fd version of AsyncSocket::tfoSendMsg · d0d36d4b
      Orvid King authored
      Summary: It is no longer needed
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13095360
      
      fbshipit-source-id: 590b5483be9c14e2c8e8c06136f12de3c582368d
      d0d36d4b
    • Orvid King's avatar
      Shift SocketFastOpen fully over to NetworkSocket · 936995ec
      Orvid King authored
      Summary: This means removing it's file-descriptor variants.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13104563
      
      fbshipit-source-id: 769aa050f08d3fa57c71aa4e8064cf1dc711cf80
      936995ec
    • Yedidya Feldblum's avatar
      Tweak createGlobal · 8bafceff
      Yedidya Feldblum authored
      Summary: [Folly] Tweak createGlobal: use a local struct and padd a general callable.
      
      Reviewed By: andrewjcg
      
      Differential Revision: D13113756
      
      fbshipit-source-id: a40f43280e5f83f08963c7ecedcb82fab65c95b4
      8bafceff
    • Andrew Gallagher's avatar
      folly: add missing `<limits.h>` include · 689ef909
      Andrew Gallagher authored
      Summary: (Note: this ignores all push blocking failures!)
      
      Differential Revision: D13113896
      
      fbshipit-source-id: aefac5744e0f2e2f5ab27753de4662234a0e0de6
      689ef909
    • Andrew Gallagher's avatar
      folly: various include fixes for modular build errors · ab18d76b
      Andrew Gallagher authored
      Summary:
      - Don't use rule-private `*-inl.h` headers outside of rule.
      - Don't `#include` headers inside of namespaces.
      - Add missing `#include`s.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13056548
      
      fbshipit-source-id: 9fb01be3e705cf107bdb55de3bd92300bc4bfec5
      ab18d76b
    • Orvid King's avatar
      Remove fd overload of AsyncSocket::IoHandler::IoHandler() · 82f11a60
      Orvid King authored
      Summary: It's no longer needed
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13106461
      
      fbshipit-source-id: fcd194a2815581e2f8e2e181019d67a088f8788a
      82f11a60
  2. 16 Nov, 2018 3 commits
  3. 15 Nov, 2018 5 commits
  4. 14 Nov, 2018 6 commits
    • Maged Michael's avatar
      hazptr: Batches and tags for managing destruction order. · b2df58ec
      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
      b2df58ec
    • Mingtao Yang's avatar
      SSLContext::loadCertificateFromBufferPEM should load entire chain · 77f06ada
      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
      77f06ada
    • Lee Howes's avatar
      Split folly::futures::map over value and Try forms · df642f04
      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
      df642f04
    • Yiding Jia's avatar
      Fix folly/Range.h with c++17 and libc++ again · 90ae95ed
      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
      90ae95ed
    • Andrew Gallagher's avatar
      folly/executors: fix extraneous semi-colon · faa7f7fb
      Andrew Gallagher authored
      Reviewed By: yfeldblum
      
      Differential Revision: D13056552
      
      fbshipit-source-id: 910296cda7d392972a48c8fa3e425b4bdeaa5d26
      faa7f7fb
    • Yedidya Feldblum's avatar
      Move asm_rdtsc to its own header and rename · aedf6079
      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
      aedf6079
  5. 13 Nov, 2018 6 commits
  6. 12 Nov, 2018 12 commits
    • Orvid King's avatar
      Convert ShutdownSocketSetTest to use NetworkSocket · 1d27782a
      Orvid King authored
      Summary: Convert the tests as well
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12981682
      
      fbshipit-source-id: b07567802c4ddba0e0d1fbab7ea021b9ea948c42
      1d27782a
    • Orvid King's avatar
      SSLSessionTest now uses NetworkSocket · 17aa81d3
      Orvid King authored
      Summary: Port more things over.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12989142
      
      fbshipit-source-id: 6066978e42080748658cbe6ff94034037af2c656
      17aa81d3
    • Orvid King's avatar
      NetworkSocket support in SocketPair · 95ceac65
      Orvid King authored
      Summary: More!
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818656
      
      fbshipit-source-id: acb269258524ae22bf8761407713b89cf3d57a3a
      95ceac65
    • Orvid King's avatar
      NetworkSocket support for AsyncSSLSocket · 1f1d9662
      Orvid King authored
      Summary: More things.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818556
      
      fbshipit-source-id: 8e839489eb92a3ec3f0ac391c157ad3de42d596b
      1f1d9662
    • Orvid King's avatar
      NetworkSocket support for BlockingSocket · e47087b7
      Orvid King authored
      Summary: Just keep porting, just keep porting.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818498
      
      fbshipit-source-id: 48d404ed17caa79c241e2facc1a3d93715ce02cb
      e47087b7
    • Orvid King's avatar
      NetworkSocket support for AsyncSocket · c7b21fd1
      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
      c7b21fd1
    • Orvid King's avatar
      NetworkSocket support for SocketFastOpen · 083c73bd
      Orvid King authored
      Summary: More support infrastructure.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818441
      
      fbshipit-source-id: b6d3a276ea332eccf8c6f43484fd25ec543bcc08
      083c73bd
    • Orvid King's avatar
      NetworkSocket support for OpenSSLUtils · f4c9e7d2
      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
      f4c9e7d2
    • Orvid King's avatar
      Support NetworkSocket in ShutdownSocketSet · f5cc18a3
      Orvid King authored
      Summary: More places supporting NetworkSocket.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D12818369
      
      fbshipit-source-id: 6ee0ce2dde3283ea7fd8f657329dc55c78c90714
      f5cc18a3
    • Kirk Shoop's avatar
      force newlines and lint · d580d889
      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
      d580d889
    • Kirk Shoop's avatar
      fix CTAD for receiver · 10da1e9d
      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
      10da1e9d
    • Matt Glazar's avatar
      Improve assertion messages from Random::secureRandom · 486c6593
      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
      486c6593
  7. 11 Nov, 2018 2 commits