Skip to content

Commit

Permalink
* sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Aug 20, 2005
1 parent 2a81f17 commit d6c7294
Show file tree
Hide file tree
Showing 9 changed files with 235 additions and 116 deletions.
25 changes: 25 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
2005-08-19 H.J. Lu <hongjiu.lu@intel.com>

* 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.

2005-08-17 Paul Eggert <eggert@cs.ucla.edu>

[BZ #1207]
Expand Down
41 changes: 38 additions & 3 deletions include/atomic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Internal macros for atomic operations for GNU C Library.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
Expand Down Expand Up @@ -108,7 +108,7 @@
__typeof (*(mem)) __value = (newvalue); \
\
do \
__oldval = (*__memp); \
__oldval = *__memp; \
while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__value, \
__oldval),\
Expand All @@ -130,7 +130,7 @@
__typeof (*(mem)) __value = (value); \
\
do \
__oldval = (*__memp); \
__oldval = *__memp; \
while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__oldval \
+ __value,\
Expand All @@ -141,6 +141,41 @@
#endif



#ifndef atomic_max
# define atomic_max(mem, value) \
do { \
__typeof (*(mem)) __oldval; \
__typeof (mem) __memp = (mem); \
__typeof (*(mem)) __value = (value); \
do { \
__oldval = *__memp; \
if (__oldval >= __value) \
break; \
} while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__value, \
__oldval),\
0)); \
} while (0)
#endif

#ifndef atomic_min
# define atomic_min(mem, value) \
do { \
__typeof (*(mem)) __oldval; \
__typeof (mem) __memp = (mem); \
__typeof (*(mem)) __value = (value); \
do { \
__oldval = *__memp; \
if (__oldval <= __value) \
break; \
} while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__value, \
__oldval),\
0)); \
} while (0)
#endif

#ifndef atomic_add
# define atomic_add(mem, value) (void) atomic_exchange_and_add ((mem), (value))
#endif
Expand Down
7 changes: 4 additions & 3 deletions intl/localealias.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Handle aliases for locale names.
Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
Copyright (C) 1995-2002, 2003, 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
Expand Down Expand Up @@ -295,7 +295,7 @@ read_alias_file (fname, fname_len)

if (nmap >= maxmap)
if (__builtin_expect (extend_alias_table (), 0))
return added;
goto out;

alias_len = strlen (alias) + 1;
value_len = strlen (value) + 1;
Expand All @@ -308,7 +308,7 @@ read_alias_file (fname, fname_len)
? alias_len + value_len : 1024));
char *new_pool = (char *) realloc (string_space, new_size);
if (new_pool == NULL)
return added;
goto out;

if (__builtin_expect (string_space != new_pool, 0))
{
Expand Down Expand Up @@ -349,6 +349,7 @@ read_alias_file (fname, fname_len)
while (strchr (buf, '\n') == NULL);
}

out:
/* Should we test for ferror()? I think we have to silently ignore
errors. --drepper */
fclose (fp);
Expand Down
2 changes: 1 addition & 1 deletion malloc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ $(objpfx)memusage: memusage.sh


# The implementation uses `dlsym'
$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so
$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so $(elfobjdir)/ld.so

# Extra dependencies
$(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c
Loading

0 comments on commit d6c7294

Please sign in to comment.