summaryrefslogtreecommitdiffstats
path: root/test/unit/ckh.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace tabs following #define with spaces.Jason Evans2017-01-211-1/+1
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-2/+2
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-10/+8
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-1/+0
| | | | This resolves #535.
* Do not (recursively) allocate within tsd_fetch().Jason Evans2016-10-211-21/+21
| | | | | | | Refactor tsd so that tsdn_fetch() does not trigger allocation, since allocation could cause infinite recursion. This resolves #458.
* Resolve bootstrapping issues when embedded in FreeBSD libc.Jason Evans2016-05-111-23/+23
| | | | | | | | | | | | | b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.) caused a broad propagation of tsd throughout the internal API, but tsd_fetch() was designed to fail prior to tsd bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and nullable tsdn_t, and modifying all internal APIs that do not critically rely on tsd to take nullable pointers. Furthermore, add the tsd_booted_get() function so that tsdn_fetch() can probe whether tsd bootstrapping is complete and return NULL if not. All dangerous conversions of nullable pointers are tsdn_tsd() calls that assert-fail on invalid conversion.
* Fix MinGW-related portability issues.Jason Evans2015-07-231-23/+20
| | | | | | | | | | | | | Create and use FMT* macros that are equivalent to the PRI* macros that inttypes.h defines. This allows uniform use of the Unix-specific format specifiers, e.g. "%zu", as well as avoiding Windows-specific definitions of e.g. PRIu64. Add ffs()/ffsl() support for compiling with gcc. Extract compatibility definitions of ENOENT, EINVAL, EAGAIN, EPERM, ENOMEM, and ENORANGE into include/msvc_compat/windows_extra.h and use the file for tests as well as for core jemalloc code.
* Fix more MinGW build warnings.Jason Evans2015-07-181-17/+20
|
* Fix tsd cleanup regressions.Jason Evans2014-10-041-6/+3
| | | | | | | | | | | | | | | | Fix tsd cleanup regressions that were introduced in 5460aa6f6676c7f253bfcb75c028dfd38cae8aaf (Convert all tsd variables to reside in a single tsd structure.). These regressions were twofold: 1) tsd_tryget() should never (and need never) return NULL. Rename it to tsd_fetch() and simplify all callers. 2) tsd_*_set() must only be called when tsd is in the nominal state, because cleanup happens during the nominal-->purgatory transition, and re-initialization must not happen while in the purgatory state. Add tsd_nominal() and use it as needed. Note that tsd_*{p,}_get() can still be used as long as no re-initialization that would require cleanup occurs. This means that e.g. the thread_allocated counter can be updated unconditionally.
* Convert to uniform style: cond == false --> !condJason Evans2014-10-031-2/+1
|
* Convert all tsd variables to reside in a single tsd structure.Jason Evans2014-09-231-17/+29
|
* Fix message formatting errors uncovered by p_test_fail() refactoring.Jason Evans2014-03-301-6/+6
|
* Add ckh unit tests.Jason Evans2013-12-171-0/+206