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/gai_suspend.c | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'resolv/gai_suspend.c')
-rw-r--r-- | resolv/gai_suspend.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/resolv/gai_suspend.c b/resolv/gai_suspend.c index 4d85ac2c10..bb3c9c3402 100644 --- a/resolv/gai_suspend.c +++ b/resolv/gai_suspend.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 <sys/time.h> -#include <gai_misc.h> +#include "gai_misc.h" int @@ -32,11 +32,9 @@ gai_suspend (const struct gaicb *const list[], int ent, { struct waitlist waitlist[ent]; struct requestlist *requestlist[ent]; -#ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t cond = PTHREAD_COND_INITIALIZER; -#endif int cnt; - int cntr = 1; + int dummy; int none = 1; int result; @@ -52,11 +50,9 @@ gai_suspend (const struct gaicb *const list[], int ent, if (requestlist[cnt] != NULL) { -#ifndef DONT_NEED_GAI_MISC_COND waitlist[cnt].cond = &cond; -#endif waitlist[cnt].next = requestlist[cnt]->waiting; - waitlist[cnt].counterp = &cntr; + waitlist[cnt].counterp = &dummy; waitlist[cnt].sigevp = NULL; waitlist[cnt].caller_pid = 0; /* Not needed. */ requestlist[cnt]->waiting = &waitlist[cnt]; @@ -82,10 +78,6 @@ gai_suspend (const struct gaicb *const list[], int ent, which we must remove. So defer cancelation for now. */ pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); -#ifdef DONT_NEED_GAI_MISC_COND - result = 0; - GAI_MISC_WAIT (result, cntr, timeout, 1); -#else if (timeout == NULL) result = pthread_cond_wait (&cond, &__gai_requests_mutex); else @@ -107,7 +99,6 @@ gai_suspend (const struct gaicb *const list[], int ent, result = pthread_cond_timedwait (&cond, &__gai_requests_mutex, &abstime); } -#endif /* Now remove the entry in the waiting list for all requests which didn't terminate. */ @@ -130,12 +121,10 @@ gai_suspend (const struct gaicb *const list[], int ent, /* 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 if (result != 0) { |