public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jose Luu" <jluu@mainsoft.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Threads don't wake up in ia32 mode
Date: Fri, 29 Jun 2001 16:37:49 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005805@msgid-missing> (raw)

My actual case is much more complex than the test sample that I have
attached, but have the same symptoms: the awakened thread is looping in
pthread_handle_sigrestart.

This is with 2.4.5 using the 2.4.5-ia64-010626.diff on a single proc Big
Sur. It happens with both the ia32 glibc 2.1.3 and ia32 glibc 2.2.1. No
problems with this program in native mode (ia32 on Pentium or ia64 on
itanium).

I'll appreciate any hints.

Thanks
Jose

----------------------- test case ------------------------------------
#include <pthread.h>
#include <stdio.h>

#if !defined(FALSE)
#define FALSE 0
#endif
#if !defined(TRUE)
#define TRUE 1
#endif

pthread_mutex_t Mutex;
pthread_cond_t Condition;

int varúLSE;

void* waker(void* pvparam)
{
    int dowake;

    while(TRUE) {
 dowakeúLSE;

 pthread_mutex_lock(&Mutex);

 if (var = FALSE) {
     var=TRUE;
     pthread_cond_signal(&Condition);
 }
 pthread_mutex_unlock(&Mutex);
    }
}

main()
{
    pthread_t t_Wakeup;
    int i;

    pthread_mutex_init(&Mutex,NULL);
    pthread_cond_init(&Condition,NULL);

    pthread_create(&t_Wakeup,NULL,waker,NULL);
    for (i=0;i<10000;i++) {
 pthread_mutex_lock(&Mutex);
 varúLSE;
 while (var != TRUE) {
     pthread_cond_wait(&Condition,&Mutex);
 }
 pthread_mutex_unlock(&Mutex);
    }
}




                 reply	other threads:[~2001-06-29 16:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590693005805@msgid-missing \
    --to=jluu@mainsoft.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox