[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r21013 - in /fsf/trunk/libc: ./ include/sys/ malloc/ misc/ nptl/ sysdeps/mach/hurd/ sysdeps/unix/ sysdeps/unix/sysv/linux/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r21013 - in /fsf/trunk/libc: ./ include/sys/ malloc/ misc/ nptl/ sysdeps/mach/hurd/ sysdeps/unix/ sysdeps/unix/sysv/linux/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 05 Oct 2012 00:03:00 -0000
Author: eglibc
Date: Fri Oct 5 00:02:59 2012
New Revision: 21013
Log:
Import glibc-mainline for 2012-10-05
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/sys/mman.h
fsf/trunk/libc/malloc/arena.c
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/misc/Versions
fsf/trunk/libc/misc/madvise.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/pthread_create.c
fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
fsf/trunk/libc/sysdeps/unix/syscalls.list
fsf/trunk/libc/sysdeps/unix/sysv/linux/syscalls.list
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Oct 5 00:02:59 2012
@@ -1,3 +1,18 @@
+2012-10-04 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * misc/Versions (GLIBC_PRIVATE): New set, add __madvise.
+ * misc/madvise.c (madvise): Renamed to __madvise.
+ Make madvise a weak alias.
+ * include/sys/mman.h: Declare __madvise.
+ Replace libc_hidden_proto (madvise) with libc_hidden_proto (__madvise).
+ * sysdeps/unix/syscalls.list
+ (madvise): Make __madvise the strong name, and madvise a weak alias.
+ * sysdeps/unix/sysv/linux/syscalls.list
+ (madvise, mmap): Remove redundant entries.
+ * malloc/arena.c (shrink_heap): Use __madvise, not madvise.
+ * malloc/malloc.c (mtrim): Likewise.
+ * sysdeps/mach/hurd/malloc-machine.h (madvise): Renamed to __madvise.
+
2012-10-03 Roland McGrath <roland@xxxxxxxxxxxxx>
* sysdeps/mach/hurd/dl-cache.c: File removed.
Modified: fsf/trunk/libc/include/sys/mman.h
==============================================================================
--- fsf/trunk/libc/include/sys/mman.h (original)
+++ fsf/trunk/libc/include/sys/mman.h Fri Oct 5 00:02:59 2012
@@ -10,11 +10,12 @@
extern int __munmap (void *__addr, size_t __len);
extern int __mprotect (void *__addr, size_t __len, int __prot);
+extern int __madvise (void *__addr, size_t __len, int __advice);
+libc_hidden_proto (__madvise)
+
/* This one is Linux specific. */
extern void *__mremap (void *__addr, size_t __old_len,
size_t __new_len, int __flags, ...);
-
-libc_hidden_proto (madvise);
#endif
#endif
Modified: fsf/trunk/libc/malloc/arena.c
==============================================================================
--- fsf/trunk/libc/malloc/arena.c (original)
+++ fsf/trunk/libc/malloc/arena.c Fri Oct 5 00:02:59 2012
@@ -634,7 +634,7 @@
h->mprotect_size = new_size;
}
else
- madvise ((char *)h + new_size, diff, MADV_DONTNEED);
+ __madvise ((char *)h + new_size, diff, MADV_DONTNEED);
/*fprintf(stderr, "shrink %p %08lx\n", h, new_size);*/
h->size = new_size;
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Fri Oct 5 00:02:59 2012
@@ -4450,7 +4450,7 @@
content. */
memset (paligned_mem, 0x89, size & ~psm1);
#endif
- madvise (paligned_mem, size & ~psm1, MADV_DONTNEED);
+ __madvise (paligned_mem, size & ~psm1, MADV_DONTNEED);
result = 1;
}
Modified: fsf/trunk/libc/misc/Versions
==============================================================================
--- fsf/trunk/libc/misc/Versions (original)
+++ fsf/trunk/libc/misc/Versions Fri Oct 5 00:02:59 2012
@@ -149,4 +149,7 @@
GLIBC_2.16 {
__getauxval; getauxval;
}
+ GLIBC_PRIVATE {
+ __madvise;
+ }
}
Modified: fsf/trunk/libc/misc/madvise.c
==============================================================================
--- fsf/trunk/libc/misc/madvise.c (original)
+++ fsf/trunk/libc/misc/madvise.c Fri Oct 5 00:02:59 2012
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994,1995,1996,1997,2000,2007 Free Software Foundation, Inc.
+/* Advise system about intentions for a memory region. Stub version.
+ Copyright (C) 1994-2012 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
@@ -23,11 +24,13 @@
for the region starting at ADDR and extending LEN bytes. */
int
-madvise (__ptr_t addr, size_t len, int advice)
+__madvise (void *addr, size_t len, int advice)
{
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (madvise)
+libc_hidden_def (__madvise)
+weak_alias (__madvise, madvise)
+
stub_warning (madvise)
#include <stub-tag.h>
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Oct 5 00:02:59 2012
@@ -1,3 +1,7 @@
+2012-10-04 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * pthread_create.c (start_thread): Use __madvise, not madvise.
+
2012-10-02 H.J. Lu <hongjiu.lu@xxxxxxxxx>
* sysdeps/i386/tls.h: Update copyright years.
Modified: fsf/trunk/libc/nptl/pthread_create.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_create.c (original)
+++ fsf/trunk/libc/nptl/pthread_create.c Fri Oct 5 00:02:59 2012
@@ -399,7 +399,7 @@
#endif
assert (freesize < pd->stackblock_size);
if (freesize > PTHREAD_STACK_MIN)
- madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
+ __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
/* If the thread is detached free the TCB. */
if (IS_DETACHED (pd))
Modified: fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h Fri Oct 5 00:02:59 2012
@@ -66,8 +66,9 @@
#include <sys/mman.h>
-#undef madvise
-#define madvise(addr, len, advice) ((void) (addr), (void) (len), (void) (advice))
+#undef __madvise
+#define __madvise(addr, len, advice) \
+ ((void) (addr), (void) (len), (void) (advice))
#include <sysdeps/generic/malloc-machine.h>
Modified: fsf/trunk/libc/sysdeps/unix/syscalls.list
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/syscalls.list (original)
+++ fsf/trunk/libc/sysdeps/unix/syscalls.list Fri Oct 5 00:02:59 2012
@@ -41,7 +41,7 @@
link - link i:ss __link link
listen - listen i:ii __listen listen
lseek - lseek i:iii __libc_lseek __lseek lseek
-madvise - madvise i:pii madvise
+madvise - madvise i:pii __madvise madvise
mkdir - mkdir i:si __mkdir mkdir
mmap - mmap b:aniiii __mmap mmap
mprotect - mprotect i:aii __mprotect mprotect
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/syscalls.list
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/syscalls.list (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/syscalls.list Fri Oct 5 00:02:59 2012
@@ -36,11 +36,9 @@
iopl - iopl i:i iopl
klogctl EXTRA syslog i:isi klogctl
lchown - lchown i:sii __lchown lchown
-madvise - madvise i:pii madvise
mincore - mincore i:anV mincore
mlock - mlock i:bn mlock
mlockall - mlockall i:i mlockall
-mmap - mmap b:aniiii __mmap mmap
mount EXTRA mount i:sssip __mount mount
mremap EXTRA mremap b:ainip __mremap mremap
munlock - munlock i:ai munlock
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits