@@ -2,5 +2,5 @@
|
||||
|
||||
void *
|
||||
btalloc(size_t size, unsigned bits) {
|
||||
return (btalloc_0(size, bits));
|
||||
return btalloc_0(size, bits);
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ mtx_init(mtx_t *mtx) {
|
||||
#ifdef _WIN32
|
||||
if (!InitializeCriticalSectionAndSpinCount(&mtx->lock,
|
||||
_CRT_SPINCOUNT)) {
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
mtx->lock = OS_UNFAIR_LOCK_INIT;
|
||||
@@ -19,16 +19,16 @@ mtx_init(mtx_t *mtx) {
|
||||
pthread_mutexattr_t attr;
|
||||
|
||||
if (pthread_mutexattr_init(&attr) != 0) {
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
if (pthread_mutex_init(&mtx->lock, &attr) != 0) {
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
#endif
|
||||
return (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -65,7 +65,7 @@ p_test_impl(bool do_malloc_init, test_t *t, va_list ap) {
|
||||
*/
|
||||
if (nallocx(1, 0) == 0) {
|
||||
malloc_printf("Initialization error");
|
||||
return (test_status_fail);
|
||||
return test_status_fail;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ p_test_impl(bool do_malloc_init, test_t *t, va_list ap) {
|
||||
test_status_string(test_status_fail),
|
||||
test_counts[test_status_fail], test_count);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
test_status_t
|
||||
@@ -98,7 +98,7 @@ p_test(test_t *t, ...) {
|
||||
ret = p_test_impl(true, t, ap);
|
||||
va_end(ap);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
test_status_t
|
||||
@@ -111,7 +111,7 @@ p_test_no_malloc_init(test_t *t, ...) {
|
||||
ret = p_test_impl(false, t, ap);
|
||||
va_end(ap);
|
||||
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -18,7 +18,7 @@ timer_usec(const timedelta_t *timer) {
|
||||
|
||||
nstime_copy(&delta, &timer->t1);
|
||||
nstime_subtract(&delta, &timer->t0);
|
||||
return (nstime_ns(&delta) / 1000);
|
||||
return nstime_ns(&delta) / 1000;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user