URGENT PATCH: pthreads lockup fix



hello,

oki as you read in my previous mail, i've got these pthreads
locks, where the retriving dialog freezes or the program just
exists with address 0.

i went through all the pthreads related code and hung in the
src/main-window.c source. where you give a gpointer of (void *)0.
who wants the contents of address 0 ?

well i changed this one from (void *)0 to NULL since gpointer
data is never required when calling this function and guess what,
everything works perfectly now.

i call this patch a terribly urgent patch but on the otherhand
i am no pthreads expert myself. so please someone else confirm
my theory and if its prooven please COMMIT it ASAP.

this crap gave me headache for a long time. sometimes it works
perfectly but then from one day to another it hung other people
reported this one often too. so i hopefully was able nailing this
down.

but please confirm....

-- 
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
--- /mnt/private/temp/cvstree/balsa/src/main-window.c	Sun Aug 19 21:53:33 2001
+++ balsa/src/main-window.c	Mon Aug 20 01:19:05 2001
@@ -1582,7 +1582,7 @@
 
     /* initiate threads */
     pthread_create(&get_mail_thread,
-		   NULL, (void *) &check_messages_thread, (void *)0);
+		   NULL, (void *) &check_messages_thread, NULL);
     
     /* Detach so we don't need to pthread_join
      * This means that all resources will be


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]