- 26 Jul, 2016 12 commits
-
-
Christopher Dykes authored
Summary: It didn't like using `decltype(args)`, which wasn't really necessary as we already have it's type. Reviewed By: yfeldblum Differential Revision: D3623424 fbshipit-source-id: 994c23cbf486d427c6dd0fe4c6f768e51ea15ad1
-
Christopher Dykes authored
Summary: It doesn't exist anywhere else, and `syscall` isn't even defined on Windows, so this completely failed to compile before. Reviewed By: yfeldblum Differential Revision: D3623382 fbshipit-source-id: 302093ddc96d6465e0dcc1883747229a7fb25a84
-
Christopher Dykes authored
Summary: So that the `[[noreturn]]` attribute can be applied. Reviewed By: yfeldblum Differential Revision: D3614122 fbshipit-source-id: 4b95cb553e85c85c277c00b8165671dcc75afac8
-
Christopher Dykes authored
Summary: Specifically the loosening of the definition of a range where-by the end of an iterator may be represented by a different type than the beginning of the range. Oh, and it also fixes compilation on MSVC, which didn't like the decltype being used to determine the iterator type. Reviewed By: yfeldblum Differential Revision: D3613993 fbshipit-source-id: 2940a15d0f93c5b6310d0b1896f5d12ca9aec639
-
Michael Lee authored
Summary: Add a declaration to mock out FlagSaver on platforms that don't support gflags. Reviewed By: ivmaykov, yfeldblum Differential Revision: D3620421 fbshipit-source-id: c1047f34f384f34276b18f53e966a65cdd5c8075
-
Andrii Grynenko authored
Summary: This allows having some logic executed before and after FiberManager loop (e.g. grabbing a Python GIL). Reviewed By: A5he Differential Revision: D3616752 fbshipit-source-id: 3be35d54ced458328816d583133457a44a863acd
-
Yang Chi authored
Summary: This crashes unit test with asan, since we never deletes it. Reviewed By: djwatson Differential Revision: D3622847 fbshipit-source-id: f7ea7c4f464843353b24a59adefd5d66b95bc169
-
Yang Chi authored
Summary: cb is an unused variable, and i got error in android. It seems like we don't need to go through the list to increase count. Differential Revision: D3622772 fbshipit-source-id: fe1f81a1fcad5bacad052e14b7b0b370beb3f3e5
-
Christopher Dykes authored
Summary: MSVC needs a bit more glue to expand the varargs. Reviewed By: yfeldblum Differential Revision: D3614681 fbshipit-source-id: 901d8c5138b1d2d28434c51bdff31f6d21f26681
-
Christopher Dykes authored
Summary: Because it's using `ssize_t`, which MSVC defines weirdly. Reviewed By: yfeldblum Differential Revision: D3614050 fbshipit-source-id: 422621ea0dc92b374fa6dfc32a5391c1093d039e
-
Neel Goyal authored
Summary: Refactor the socket peeker into its own class so that it can be used in other places as well, for example for peeking at plaintext traffic. Reviewed By: knekritz Differential Revision: D3521899 fbshipit-source-id: fcd5615dd5d7cd1ddece4c624efbdecfbbc88a09
-
Misha Shneerson authored
Summary: We should go back to 10ms granularity. Because regressions - https://www.facebook.com/groups/wfi/permalink/1107102889338325/ Reviewed By: haijunz Differential Revision: D3616784 fbshipit-source-id: dc1d7ff5195ae836df4a334a9ac5c41164c0627b
-
- 24 Jul, 2016 3 commits
-
-
Giuseppe Ottaviano authored
Reviewed By: yfeldblum Differential Revision: D3611881 fbshipit-source-id: 3991c18cc2956e9d0b50a20e6daf913ec58ee501
-
Giuseppe Ottaviano authored
Reviewed By: dkgi Differential Revision: D3586189 fbshipit-source-id: ce817233a0293e19400b5689c283531be6302c10
-
Qinfan Wu authored
Summary: As more code is using mallctl, it's worth making these helper functions available everywhere. Reviewed By: yfeldblum Differential Revision: D3576190 fbshipit-source-id: 968e80e00f2ed93542e117c24861c21745b63f20
-
- 23 Jul, 2016 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Move `RequestContext` definitions to source files. Keeping headers lightweight can help with build times. Reviewed By: djwatson Differential Revision: D3609809 fbshipit-source-id: 20608e3ff764c86c24355a328da1dcca9a08fce4
-
- 22 Jul, 2016 11 commits
-
-
Melanie Subbiah authored
Summary: In order to trigger trace points when a new thread begins/finishes executing, I added functionality to call onSet and onUnset methods on all RequestData objects whenever setContext is called. The main question: will this approach cost us too much overhead? Reviewed By: djwatson Differential Revision: D3604948 fbshipit-source-id: 3b704ca0f2b713458427aa49be12f776939057f8
-
Mark Isaacson authored
Summary: This code very obviously wrote past the end of the buffer when the length was 1. Furthermore, it was just downright broken for all values. The author obviously meant to type * instead of +. I took the time to verify that the algorithm is actually correct, while I was working on this. My proof is in the test plan. Reviewed By: yfeldblum, meyering Differential Revision: D3603255 fbshipit-source-id: 5f2a0011ff5401a70ba03993eab6e53e29d87c1c
-
Christopher Dykes authored
Summary: Because Windows already defines a funtion named `GetTickCount` with a different signature. Reviewed By: yfeldblum Differential Revision: D3601877 fbshipit-source-id: fa0fb422156a3dc71e149e02a000ccdf3479eea5
-
Christopher Dykes authored
Summary: There was an MSVC section, but it's much simpler to just use the glue to solve the issue instead. Reviewed By: yfeldblum Differential Revision: D3601184 fbshipit-source-id: f95bd3dfc4b244e1bce21997f44de2970575ad7f
-
Christopher Dykes authored
Summary: A `long` on MSVC is only 4 bytes, so the `static_assert` will fail. Remove the static assert and use the `long long` version instead. Do the same for the unsigned version. Reviewed By: yfeldblum Differential Revision: D3601064 fbshipit-source-id: 70c5f4bca597ba05c3729f5d15feeea3cc8fde57
-
Christopher Dykes authored
Summary: Because we need it for MSVC. Reviewed By: yfeldblum Differential Revision: D3601138 fbshipit-source-id: 4d2ba3f9c972717745289686b025d2763f9ef30d
-
Christopher Dykes authored
Summary: As the comment in the file says, this has to be included in a weird order due to issues on Windows. Reviewed By: yfeldblum Differential Revision: D3601008 fbshipit-source-id: fca4b6d906eb0d1f001c28197987165cd075752d
-
Christopher Dykes authored
Summary: As the `sizeof()` is being evaluated in a static context, MSVC doesn't let you reference non-static locals. Solve the issue by getting the type of the local via `decltype` instead. Reviewed By: yfeldblum Differential Revision: D3600845 fbshipit-source-id: 825d93ced8f09d9f4bf0dcf02142f47a0ec32605
-
Christopher Dykes authored
Summary: This was causing MSVC to complain due to `DSched` already being declared in `BatonTestHelpers.h` as `::folly::DSched`, but it's then typedef'd again in `BatonTest.cpp`, this time as `::DSched`. MSVC complains about the duplicate definitions even though they resolve to the same type, so kill the one in the source file and keep the one in the header. The same is the case with `GroupVarint32Decoder` and `GroupVarint64Decoder`, which are both declared in `GroupVarint.h` and then again, this time in an anon namespace, in `GroupVarintTest.cpp`. Reviewed By: yfeldblum Differential Revision: D3600948 fbshipit-source-id: 401790aa918289fe4a34dd5af683f8c6ca50d847
-
Wez Furlong authored
Summary: uniform_int_distribution is implemented differently on this system and always returns the generated number from our constant random number generator. Reviewed By: yfeldblum Differential Revision: D3585418 fbshipit-source-id: 754076599ba77b49c17f03bb0c92264a3bed4ab0
-
Christopher Dykes authored
Summary: Because it doesn't exist in the C++ standard. This switches them to the explicitly expanded form, which is in the spec. It also removes a few that were doing absolutely nothing. (MSVC still complained about the division by zero) Reviewed By: yfeldblum Differential Revision: D3479260 fbshipit-source-id: 5386e27057beeb4b228f5d6be4e1cf9941cf3176
-
- 21 Jul, 2016 3 commits
-
-
Christopher Dykes authored
Summary: Sure, it's big, but it compiles. There are a few different changes to make this happen, the first is to deal with quite a few places where MSVC was complaining about the implicit coersion of template and noexcept parameters to bool. Next, the gating that disabled this for 4.7 is now gone. MSVC's runtime expected `difference_type` to be defined on our custom allocator, so it now is. `ReadTSC()` was changed to use MSVC's intrinsic for this. And finally, the named variadic parameters to macros were switched to normal variadic macro params, as MSVC doesn't support named ones. Reviewed By: yfeldblum Differential Revision: D3479761 fbshipit-source-id: 703a5ef942ffc9b63381d13fc3960ac6f2780aa0
-
Christopher Dykes authored
Summary: Because they aren't captured, and thus aren't accessible, in the callback used further on in the function. Reviewed By: yfeldblum Differential Revision: D3600874 fbshipit-source-id: 699b3d4caa0a310b1ccc7810d670671850f4366b
-
Christopher Dykes authored
Summary: We don't have `fork()` to begin with, so disable the test and the includes it required if we're compiling on Windows. Reviewed By: yfeldblum Differential Revision: D3600600 fbshipit-source-id: 5399705753b456139105f4ac757190e1ba1765f2
-
- 20 Jul, 2016 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] `allocate_sys_buffer`. For when a `malloc`'d buffer is required, with an associated deleter that calls `free`. Reviewed By: JonCoens Differential Revision: D3590516 fbshipit-source-id: 644f4b5d5e8f19dbc8f29efe3e93517fba0ad72f
-
Mingtian Yin authored
Summary: Record whether cached certificate was used Reviewed By: anirudhvr Differential Revision: D3582807 fbshipit-source-id: 246107ce383ff31718ee7dcccf8bbea459b559a8
-
Wez Furlong authored
Summary: This makes folly/init/Init.cpp compile on macOS by leveraging equivalent functionality in the glog library when the folly symbolizer is not available. This is true for macOS and also for Windows. I haven't done anything to handle Windows in this diff. Reviewed By: yfeldblum Differential Revision: D3585509 fbshipit-source-id: 2e0c29520a53826acbf656a7a02659b4e905802f
-
- 19 Jul, 2016 7 commits
-
-
Christopher Dykes authored
Summary: On Linux hosts, the fast path to get the current time in nanoseconds without doing a syscall to the kernel is available via the VDSO kernel-runtime interface. In this diff, I: 1. Expose portability wrappers `folly::chrono::clock_gettime()` and `folly::chrono::clock_gettime_ns()` 2. Implement a VDSO wrapper on Linux hosts to implement those without a round-trip to the kernel Depends On D3418054 Reviewed By: bmaurer Differential Revision: D3418087 fbshipit-source-id: 3fb99f0dd946f19ba29d0d52a1038dad3556bafd
-
Steve Muir authored
Summary: First cut at autoconf rules for generating a pkg-config file for Folly. The only interesting part is that we want to handle packages that provide their own .pc files as dependencies rather than just stuffing them into the list of libraries required from packages that don't provide .pc. Reviewed By: simpkins Differential Revision: D3556611 fbshipit-source-id: d1c5f89416d1d96d2cdf5ccdc5bd7117fb822a82
-
Christopher Dykes authored
Summary: It is an error to attempt to get the size of a zero length array, such as `unsigned char[0]`, which is what you get if `MaxInline` has been passed in as 0. We can work around this by simply defining `InlineStorageType` to be `void*` if the size is exactly 0, which will result in the capacity correctly being stored out of line. Reviewed By: yfeldblum Differential Revision: D3572898 fbshipit-source-id: c96bb7cc6a890044bb74b0f6d5238c503552ee25
-
Elliott Clark authored
Summary: iters was only being used on one side of the producer/consumer. Reviewed By: yfeldblum Differential Revision: D3588593 fbshipit-source-id: 5e9a8a02bb9addbd6f936b8cc411d58cdf82b6e2
-
Yedidya Feldblum authored
Summary: [Folly] Make the `mprotect` variant of `asymmetricHeavyBarrier` work when `mlock` fails. Reviewed By: djwatson Differential Revision: D3585948 fbshipit-source-id: c3a46884434b7f9da9caa9cf203573f9e3ce7444
-
Michael Lee authored
Summary: FOLLY_X64 is usually defined, so check whehter it is defined to 0 or 1. In addition, memory barriers are not necessarily widely available on the mobile platforms. What leads me to believe this is that, at least for older ndk's, atomics are not guaranteed to work for multicore platforms. Reviewed By: andriigrynenko Differential Revision: D3586806 fbshipit-source-id: 3ac8c4b74cac09e41bc3cb65c8adc2732b8b2256
-
Wez Furlong authored
Summary: macOS doesn't have timedwait functionality and this header file was gating including the boost headers on that check which caused dependent modules to fail to compile because `boost::mutex` and `boost::recursive_mutex` were not known to the compiler. Reviewed By: yfeldblum Differential Revision: D3585470 fbshipit-source-id: 7f8d9603e95ce01328103c7c6ac0bc75a35ddf4d
-