tlibthread: drop schedlock - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 91ececc99741b3111c69d455bc928e871b15d766
 (DIR) parent 4692dd4786f8847494d3f020bc3c05ba210adc0d
 (HTM) Author: Russ Cox <rsc@swtch.com>
       Date:   Wed, 30 Dec 2020 08:41:01 -0500
       
       libthread: drop schedlock
       
       Having two locks in the proc was causing deadlocks.
       
       Diffstat:
         M src/libthread/thread.c              |       2 +-
         M src/libthread/threadimpl.h          |       1 -
       
       2 files changed, 1 insertion(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/libthread/thread.c b/src/libthread/thread.c
       t@@ -281,7 +281,7 @@ static void
        pthreadwakeupschedlocked(Proc *p, _Thread *self, _Thread *t)
        {
                _threaddebug(self, "pthreadwakeupschedlocked %p %d", p, t->id);;
       -        t->schedrend.l = &p->schedlock;
       +        t->schedrend.l = &p->lock;
                p->schedthread = t;
                _procwakeup(&t->schedrend);
        }
 (DIR) diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
       t@@ -88,7 +88,6 @@ struct Proc
                uint                nthread;
                uint                sysproc;
                _Procrendez        runrend;
       -        Lock                schedlock;
                _Thread        *schedthread;
                void                *udata;
                Jmp                sigjmp;