diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /resolv/getaddrinfo_a.c | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.zip glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2 |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'resolv/getaddrinfo_a.c')
-rw-r--r-- | resolv/getaddrinfo_a.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/resolv/getaddrinfo_a.c b/resolv/getaddrinfo_a.c index f6af3aa..abac27d 100644 --- a/resolv/getaddrinfo_a.c +++ b/resolv/getaddrinfo_a.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -23,7 +23,7 @@ #include <stdlib.h> #include <unistd.h> -#include <gai_misc.h> +#include "gai_misc.h" /* We need this special structure to handle asynchronous I/O. */ @@ -96,9 +96,7 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig) } else if (mode == GAI_WAIT) { -#ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t cond = PTHREAD_COND_INITIALIZER; -#endif struct waitlist waitlist[ent]; int oldstate; @@ -106,9 +104,7 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig) for (cnt = 0; cnt < ent; ++cnt) if (requests[cnt] != NULL) { -#ifndef DONT_NEED_GAI_MISC_COND waitlist[cnt].cond = &cond; -#endif waitlist[cnt].next = requests[cnt]->waiting; waitlist[cnt].counterp = &total; waitlist[cnt].sigevp = NULL; @@ -123,24 +119,15 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); while (total > 0) - { -#ifdef DONT_NEED_GAI_MISC_COND - int result; - GAI_MISC_WAIT (result, total, NULL, 1); -#else - pthread_cond_wait (&cond, &__gai_requests_mutex); -#endif - } + pthread_cond_wait (&cond, &__gai_requests_mutex); /* Now it's time to restore the cancelation state. */ pthread_setcancelstate (oldstate, NULL); -#ifndef DONT_NEED_GAI_MISC_COND /* Release the conditional variable. */ if (pthread_cond_destroy (&cond) != 0) /* This must never happen. */ abort (); -#endif } else { @@ -160,9 +147,7 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig) for (cnt = 0; cnt < ent; ++cnt) if (requests[cnt] != NULL) { -#ifndef DONT_NEED_GAI_MISC_COND waitlist->list[cnt].cond = NULL; -#endif waitlist->list[cnt].next = requests[cnt]->waiting; waitlist->list[cnt].counterp = &waitlist->counter; waitlist->list[cnt].sigevp = &waitlist->sigev; |