public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Threads don't wake up in ia32 mode
@ 2001-06-29 16:37 Jose Luu
  0 siblings, 0 replies; only message in thread
From: Jose Luu @ 2001-06-29 16:37 UTC (permalink / raw)
  To: linux-ia64

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);
    }
}




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-29 16:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-29 16:37 [Linux-ia64] Threads don't wake up in ia32 mode Jose Luu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox