aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/memusage.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-20 01:22:05 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-20 01:22:05 +0000
commitd6c7294ed609cbd8597898a1c92141dde23994bc (patch)
treeb2077c19a57c2df853ef6f9ade3fb88d4d2534a4 /sysdeps/generic/memusage.h
parent2a81f17880ff4d75cc6ef3fd4456cc23f28a6ed3 (diff)
downloadglibc-d6c7294ed609cbd8597898a1c92141dde23994bc.zip
glibc-d6c7294ed609cbd8597898a1c92141dde23994bc.tar.gz
glibc-d6c7294ed609cbd8597898a1c92141dde23994bc.tar.bz2
* sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort.
2005-08-17 Robert Love <rml@novell.com> * sysdeps/unix/sysv/linux/sys/inotify.h: Add IN_MOVE_SELF event. 2005-08-19 Bruno Haible <bruno@clisp.org> * intl/localealias.c (read_alias_file): In case of failure, close the file descriptor and sort the array before returning. 2005-08-19 Ulrich Drepper <drepper@redhat.com> * malloc/Makefile: Link libmemusage.so with ld.so. * malloc/memusage.c: Use atomic operations for all counter and size computations. Handle thread stacks. * sysdeps/generic/memusage.h: Define memusage_cntr_t and memusage_size_t. * sysdeps/i386/i686/memusage.h: New file. * include/atomic.h: Define atomic_max and atomic_min. * debug/tst-chk1.c: Add tests for mbstowcs and wcstombs.
Diffstat (limited to 'sysdeps/generic/memusage.h')
-rw-r--r--sysdeps/generic/memusage.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sysdeps/generic/memusage.h b/sysdeps/generic/memusage.h
index 3057beb..a1205ce 100644
--- a/sysdeps/generic/memusage.h
+++ b/sysdeps/generic/memusage.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,9 @@
02111-1307 USA. */
+#include <limits.h>
+#include <atomic.h>
+
#ifndef GETSP
# warning "GETSP is not defined for this architecture."
# define GETSP 0
@@ -33,3 +36,16 @@
high = usecs >> 32; \
}
#endif
+
+#if LONG_BIT == 32
+# define memusage_cntr_t uatomic32_t
+#else
+# define memusage_cntr_t uatomic64_t
+#endif
+#ifndef memusage_size_t
+# if LONG_BIT == 32
+# define memusage_size_t uatomic32_t
+# else
+# define memusage_size_t uatomic64_t
+# endif
+#endif