@@ -3,6 +3,5 @@
|
||||
void *
|
||||
btalloc(size_t size, unsigned bits)
|
||||
{
|
||||
|
||||
return (btalloc_0(size, bits));
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@
|
||||
void
|
||||
mq_nanosleep(unsigned ns)
|
||||
{
|
||||
|
||||
assert(ns <= 1000*1000*1000);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@@ -7,7 +7,6 @@
|
||||
bool
|
||||
mtx_init(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!InitializeCriticalSectionAndSpinCount(&mtx->lock, _CRT_SPINCOUNT))
|
||||
return (true);
|
||||
@@ -33,7 +32,6 @@ mtx_init(mtx_t *mtx)
|
||||
void
|
||||
mtx_fini(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
#elif (defined(JEMALLOC_OSSPIN))
|
||||
@@ -45,7 +43,6 @@ mtx_fini(mtx_t *mtx)
|
||||
void
|
||||
mtx_lock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
EnterCriticalSection(&mtx->lock);
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
@@ -60,7 +57,6 @@ mtx_lock(mtx_t *mtx)
|
||||
void
|
||||
mtx_unlock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
LeaveCriticalSection(&mtx->lock);
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
|
@@ -34,7 +34,6 @@ test_fail(const char *format, ...)
|
||||
static const char *
|
||||
test_status_string(test_status_t test_status)
|
||||
{
|
||||
|
||||
switch (test_status) {
|
||||
case test_status_pass: return "pass";
|
||||
case test_status_skip: return "skip";
|
||||
@@ -46,7 +45,6 @@ test_status_string(test_status_t test_status)
|
||||
void
|
||||
p_test_init(const char *name)
|
||||
{
|
||||
|
||||
test_count++;
|
||||
test_status = test_status_pass;
|
||||
test_name = name;
|
||||
@@ -55,7 +53,6 @@ p_test_init(const char *name)
|
||||
void
|
||||
p_test_fini(void)
|
||||
{
|
||||
|
||||
test_counts[test_status]++;
|
||||
malloc_printf("%s: %s\n", test_name, test_status_string(test_status));
|
||||
}
|
||||
@@ -127,7 +124,6 @@ p_test_no_malloc_init(test_t *t, ...)
|
||||
void
|
||||
p_test_fail(const char *prefix, const char *message)
|
||||
{
|
||||
|
||||
malloc_cprintf(NULL, NULL, "%s%s\n", prefix, message);
|
||||
test_status = test_status_fail;
|
||||
}
|
||||
|
@@ -13,7 +13,6 @@ thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
void
|
||||
thd_join(thd_t thd, void **ret)
|
||||
{
|
||||
|
||||
if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) {
|
||||
DWORD exit_code;
|
||||
GetExitCodeThread(thd, (LPDWORD) &exit_code);
|
||||
@@ -25,7 +24,6 @@ thd_join(thd_t thd, void **ret)
|
||||
void
|
||||
thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
{
|
||||
|
||||
if (pthread_create(thd, NULL, proc, arg) != 0)
|
||||
test_fail("Error in pthread_create()\n");
|
||||
}
|
||||
@@ -33,7 +31,6 @@ thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
void
|
||||
thd_join(thd_t thd, void **ret)
|
||||
{
|
||||
|
||||
pthread_join(thd, ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -3,7 +3,6 @@
|
||||
void
|
||||
timer_start(timedelta_t *timer)
|
||||
{
|
||||
|
||||
nstime_init(&timer->t0, 0);
|
||||
nstime_update(&timer->t0);
|
||||
}
|
||||
@@ -11,7 +10,6 @@ timer_start(timedelta_t *timer)
|
||||
void
|
||||
timer_stop(timedelta_t *timer)
|
||||
{
|
||||
|
||||
nstime_copy(&timer->t1, &timer->t0);
|
||||
nstime_update(&timer->t1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user