diff options
author | jasone <jasone@FreeBSD.org> | 2008-11-30 19:30:31 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2008-11-30 19:30:31 +0000 |
commit | 06474d9a01f382bbe820a58097b8f7ac7fa979ac (patch) | |
tree | 9c9c39c758eb1158ba7de8c4418841bf7196a718 /lib | |
parent | d85d1b90b5a479b9dc537b17dbff92b5b7c2c2b1 (diff) | |
download | FreeBSD-src-06474d9a01f382bbe820a58097b8f7ac7fa979ac.zip FreeBSD-src-06474d9a01f382bbe820a58097b8f7ac7fa979ac.tar.gz |
Adjust an assertion to handle the case where a lock is contested, but
spinning is avoided due to running on a single-CPU system.
Reported by: stefanf
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 4b37e72..8004d51 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1284,7 +1284,7 @@ malloc_spin_lock(pthread_mutex_t *lock) * inversion. */ _pthread_mutex_lock(lock); - assert((ret << BLOCK_COST_2POW) != 0); + assert((ret << BLOCK_COST_2POW) != 0 || ncpus == 1); return (ret << BLOCK_COST_2POW); } } |