diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-11-14 23:35:35 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-11-15 13:16:03 +0100 |
commit | 9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d (patch) | |
tree | 2d6a3d3036c0ddf314a09163619a0639359e72ed /hurd/hurdmalloc.c | |
parent | 7ed2b6921feb51d3fecdd0b72e8ab7a7f37ba4ae (diff) | |
download | glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.gz glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.xz glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.zip |
hurd: Remove some remnants of cthreads
Libc has actually been using mach's lock-internal.h mutex for a long time already.
Diffstat (limited to 'hurd/hurdmalloc.c')
-rw-r--r-- | hurd/hurdmalloc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/hurd/hurdmalloc.c b/hurd/hurdmalloc.c index 65fb959d84..7046bcef33 100644 --- a/hurd/hurdmalloc.c +++ b/hurd/hurdmalloc.c @@ -4,6 +4,7 @@ #include "hurdmalloc.h" /* XXX see that file */ #include <mach.h> +#include <mach/spin-lock.h> #define vm_allocate __vm_allocate #define vm_page_size __vm_page_size @@ -79,8 +80,6 @@ #include <assert.h> -#include <cthreads.h> - #define MCHECK /* @@ -221,7 +220,7 @@ malloc (size_t size) i += 1; n <<= 1; } - ASSERT(i < NBUCKETS); + assert(i < NBUCKETS); fl = &malloc_free_list[i]; spin_lock(&fl->lock); h = fl->head; @@ -291,11 +290,11 @@ free (void *base) * Sanity checks. */ if (i < 0 || i >= NBUCKETS) { - ASSERT(0 <= i && i < NBUCKETS); + assert(0 <= i && i < NBUCKETS); return; } if (fl != &malloc_free_list[i]) { - ASSERT(fl == &malloc_free_list[i]); + assert(fl == &malloc_free_list[i]); return; } /* @@ -340,11 +339,11 @@ realloc (void *old_base, size_t new_size) * Sanity checks. */ if (i < 0 || i >= NBUCKETS) { - ASSERT(0 <= i && i < NBUCKETS); + assert(0 <= i && i < NBUCKETS); return 0; } if (fl != &malloc_free_list[i]) { - ASSERT(fl == &malloc_free_list[i]); + assert(fl == &malloc_free_list[i]); return 0; } /* |