mirror of git://sourceware.org/git/glibc.git
parent
77751669d7
commit
3eb0e1c6d6
|
|
@ -1,5 +1,7 @@
|
||||||
2007-12-12 Ulrich Drepper <drepper@redhat.com>
|
2007-12-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* tst-basic7.c: Allocate memory for the stack.
|
||||||
|
|
||||||
[BZ #5465]
|
[BZ #5465]
|
||||||
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
|
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
|
||||||
(__pthread_cond_timedwait): Don't use VDSO.
|
(__pthread_cond_timedwait): Don't use VDSO.
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,21 @@
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
|
static void use_stack (size_t needed);
|
||||||
|
|
||||||
|
void (*use_stack_ptr) (size_t) = use_stack;
|
||||||
|
|
||||||
|
static void
|
||||||
|
use_stack (size_t needed)
|
||||||
|
{
|
||||||
|
size_t sz = sysconf (_SC_PAGESIZE);
|
||||||
|
char *buf = alloca (sz);
|
||||||
|
memset (buf, '\0', sz);
|
||||||
|
|
||||||
|
if (needed > sz)
|
||||||
|
use_stack_ptr (needed - sz);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
use_up_memory (void)
|
use_up_memory (void)
|
||||||
{
|
{
|
||||||
|
|
@ -38,6 +53,9 @@ do_test (void)
|
||||||
int err;
|
int err;
|
||||||
pthread_t tid;
|
pthread_t tid;
|
||||||
|
|
||||||
|
/* Allocate the memory needed for the stack. */
|
||||||
|
use_stack_ptr (PTHREAD_STACK_MIN);
|
||||||
|
|
||||||
use_up_memory ();
|
use_up_memory ();
|
||||||
|
|
||||||
err = pthread_create (&tid, NULL, child, NULL);
|
err = pthread_create (&tid, NULL, child, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue