diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-23 17:47:19 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-23 17:47:19 +0000 |
commit | ba408f846541f7279ef12858545abac1c26719e7 (patch) | |
tree | ee69064e7ad1e2309448d91f2125988debe2073c /nptl/sysdeps | |
parent | 9a464a6eff6a5a88c3fb68e8f4eabeaccd9f10dd (diff) | |
download | glibc-ba408f846541f7279ef12858545abac1c26719e7.zip glibc-ba408f846541f7279ef12858545abac1c26719e7.tar.gz glibc-ba408f846541f7279ef12858545abac1c26719e7.tar.bz2 |
* allocatestack.c (queue_stack): Move freeing of surplus stacks to...
(free_stacks): ...here.
(__free_stack_cache): New function.
* pthreadP.h: Declare __free_stack_cache.
* sysdeps/pthread/pthread-functions.h (pthread_functions): Add
ptr_freeres.
* init.c (pthread_functions): Initialize ptr_freeres.
* sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
New freeres function.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/pthread/pthread-functions.h | 3 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread-functions.h b/nptl/sysdeps/pthread/pthread-functions.h index d75bbbb..74d2400 100644 --- a/nptl/sysdeps/pthread/pthread-functions.h +++ b/nptl/sysdeps/pthread/pthread-functions.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2003. @@ -95,6 +95,7 @@ struct pthread_functions __attribute ((noreturn)) __cleanup_fct_attribute; void (*ptr__nptl_deallocate_tsd) (void); int (*ptr__nptl_setxid) (struct xid_command *); + void (*ptr_freeres) (void); }; /* Variable in libc.so. */ diff --git a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c index 4e60596..7c21d88 100644 --- a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c +++ b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -57,3 +57,9 @@ __libc_pthread_init (ptr, reclaim, functions) return &__libc_multiple_threads; #endif } + + +libc_freeres_fn (freeres_libptread) +{ + __libc_pthread_functions.ptr_freeres (); +} |