[Nickle] nickle: Branch 'master' - 2 commits

Keith Packard keithp at keithp.com
Fri Mar 2 11:18:44 PST 2012


 debian/source/format |    1 +
 sync.c               |   13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit a572170045122e4f0942a250c12bfe4b0f422319
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 2 11:09:51 2012 -0800

    Fix Semaphore::wait logic (again) - partial means we've woken up
    
    The only way to run do_Semaphore::wait with 'partial' set to true is
    if the thread is waking up; in this case, the semaphore count may well
    be negative if other threads are also waiting. Ignore the count in
    this case and just complete the operation.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/sync.c b/sync.c
index 588c49a..06fffc7 100644
--- a/sync.c
+++ b/sync.c
@@ -16,13 +16,14 @@ do_Semaphore_wait (Value s)
     ENTER ();
     if (aborting)
 	RETURN (Void);
-    if (!running->thread.partial)
+    if (!running->thread.partial) {
 	--s->semaphore.count;
-    if (s->semaphore.count < 0)
-    {
-	running->thread.partial = 1;
-	ThreadSleep (running, s, PrioritySync);
-	RETURN (Void);
+	if (s->semaphore.count < 0)
+	{
+	    running->thread.partial = 1;
+	    ThreadSleep (running, s, PrioritySync);
+	    RETURN (Void);
+	}
     }
     complete = True;
     RETURN (Void);
commit e24a73f89019a22a2ced7c5fd0dc4681ff4de5c6
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Feb 29 22:05:59 2012 +1300

    Add explicit debian source format 3.0 (native)
    
    Keep lintian happy
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)


More information about the Nickle mailing list