mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
parameter. Passed it as permission to mmap. * allocatestack.c (allocate_stack): Pass prot as second parameter to ARCH_RETRY_MMAP.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2007-12-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
|
||||||
|
parameter. Passed it as permission to mmap.
|
||||||
|
* allocatestack.c (allocate_stack): Pass prot as second parameter
|
||||||
|
to ARCH_RETRY_MMAP.
|
||||||
|
|
||||||
2007-12-12 Ulrich Drepper <drepper@redhat.com>
|
2007-12-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* tst-basic7.c: Allocate memory for the stack.
|
* tst-basic7.c: Allocate memory for the stack.
|
||||||
|
@ -459,7 +459,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
if (__builtin_expect (mem == MAP_FAILED, 0))
|
if (__builtin_expect (mem == MAP_FAILED, 0))
|
||||||
{
|
{
|
||||||
#ifdef ARCH_RETRY_MMAP
|
#ifdef ARCH_RETRY_MMAP
|
||||||
mem = ARCH_RETRY_MMAP (size);
|
mem = ARCH_RETRY_MMAP (size, prot);
|
||||||
if (__builtin_expect (mem == MAP_FAILED, 0))
|
if (__builtin_expect (mem == MAP_FAILED, 0))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -42,9 +42,8 @@
|
|||||||
|
|
||||||
/* If it is not possible to allocate memory there retry without that
|
/* If it is not possible to allocate memory there retry without that
|
||||||
flag. */
|
flag. */
|
||||||
#define ARCH_RETRY_MMAP(size) \
|
#define ARCH_RETRY_MMAP(size, prot) \
|
||||||
mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, \
|
mmap (NULL, size, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)
|
|
||||||
|
|
||||||
|
|
||||||
/* XXX Until we have a better place keep the definitions here. */
|
/* XXX Until we have a better place keep the definitions here. */
|
||||||
|
Reference in New Issue
Block a user