pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/wm/enlightenment16



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Sun Nov 13 00:52:01 UTC 2022

Modified Files:
        pkgsrc/wm/enlightenment16: Makefile distinfo
Added Files:
        pkgsrc/wm/enlightenment16/patches: patch-src_timers.c

Log Message:
enlightenment16: fix timer lockup issue


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/wm/enlightenment16/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/wm/enlightenment16/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/enlightenment16/patches/patch-src_timers.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/enlightenment16/Makefile
diff -u pkgsrc/wm/enlightenment16/Makefile:1.23 pkgsrc/wm/enlightenment16/Makefile:1.24
--- pkgsrc/wm/enlightenment16/Makefile:1.23     Mon Oct 24 16:48:19 2022
+++ pkgsrc/wm/enlightenment16/Makefile  Sun Nov 13 00:52:01 2022
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2022/10/24 16:48:19 gutteridge Exp $
+# $NetBSD: Makefile,v 1.24 2022/11/13 00:52:01 gutteridge Exp $
 
 DISTNAME=      e16-1.0.26
 PKGNAME=       ${DISTNAME:S/e/enlightenment/}
+PKGREVISION=   1
 CATEGORIES=    wm x11
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=enlightenment/}
 

Index: pkgsrc/wm/enlightenment16/distinfo
diff -u pkgsrc/wm/enlightenment16/distinfo:1.10 pkgsrc/wm/enlightenment16/distinfo:1.11
--- pkgsrc/wm/enlightenment16/distinfo:1.10     Mon Oct 24 16:48:19 2022
+++ pkgsrc/wm/enlightenment16/distinfo  Sun Nov 13 00:52:01 2022
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.10 2022/10/24 16:48:19 gutteridge Exp $
+$NetBSD: distinfo,v 1.11 2022/11/13 00:52:01 gutteridge Exp $
 
 BLAKE2s (e16-1.0.26.tar.gz) = a6bb822d20004fbed92e04243d5dad64063a4908f46e5b5f9c9c505281908b22
 SHA512 (e16-1.0.26.tar.gz) = 4a14fd7df5621bc291b053b9da4a1d384b058e8099d6c4856f8ec334559ee8b9346e13f1609909402932dead6ffd9cc3d3f9a36401a38bebe9ec3d4335015926
 Size (e16-1.0.26.tar.gz) = 2407581 bytes
 SHA1 (patch-ac) = a5a2f2b0377212178480cc94e6975dd4ff364ced
+SHA1 (patch-src_timers.c) = 556b2d5a36c029e108a6554c42f37c17b50ed5b0

Added files:

Index: pkgsrc/wm/enlightenment16/patches/patch-src_timers.c
diff -u /dev/null pkgsrc/wm/enlightenment16/patches/patch-src_timers.c:1.1
--- /dev/null   Sun Nov 13 00:52:01 2022
+++ pkgsrc/wm/enlightenment16/patches/patch-src_timers.c        Sun Nov 13 00:52:01 2022
@@ -0,0 +1,109 @@
+$NetBSD: patch-src_timers.c,v 1.1 2022/11/13 00:52:01 gutteridge Exp $
+
+Fix timer lockup issue.
+Upstream commit 6a0c30e77ff598e90d38dd3c58f4552a996ab4b5.
+
+--- src/timers.c.orig  2022-05-28 14:15:04.000000000 +0000
++++ src/timers.c
+@@ -1,6 +1,6 @@
+ /*
+  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
+- * Copyright (C) 2006-2019 Kim Woelders
++ * Copyright (C) 2006-2022 Kim Woelders
+  *
+  * Permission is hereby granted, free of charge, to any person obtaining a copy
+  * of this software and associated documentation files (the "Software"), to
+@@ -25,6 +25,13 @@
+ #include "list.h"
+ #include "timers.h"
+ 
++#define DEBUG_TIMERS 0
++#if DEBUG_TIMERS
++#define Dprintf(fmt...) if(EDebug(EDBUG_TYPE_TIMERS))Eprintf(fmt)
++#else
++#define Dprintf(fmt...)
++#endif
++
+ struct _timer {
+    unsigned int        in_time;
+    unsigned int        at_time;
+@@ -109,14 +116,19 @@ TimerAdd(int dt_ms, int (*func)(void *da
+ void
+ TimersRun(unsigned int t_ms)
+ {
+-   Timer              *timer, *q_old, *q_run;
++   Timer              *timer, *q_old, *q_new, *q_run;
+ 
+    timer = q_first;
+    if (!timer)
+       return;                 /* No timers pending */
+ 
+-   q_run = q_old = timer;
+-   for (; timer; timer = q_first)
++   Dprintf("%s - A\n", __func__);
++
++   q_new = timer;             /* q_new is now temporarily the timer queue */
++   q_old = timer;             /* q_old is the old timer queue */
++   q_first = NULL;            /* q_first holds timers added during timer processing */
++   q_run = NULL;              /* q_run holds the last run timer */
++   for (; timer; timer = q_new)
+      {
+       if (tdiff(timer->at_time, t_ms) > 0)
+          break;
+@@ -125,22 +137,25 @@ TimersRun(unsigned int t_ms)
+          Eprintf("%s - run %p: func=%p data=%p: %8d\n", __func__, timer,
+                  timer->func, timer->data, timer->at_time - t_ms);
+ 
+-      q_first = timer->next;
++      q_new = timer->next;
+ 
+       /* Run this callback */
+       timer->again = timer->func(timer->data);
+       q_run = timer;
+      }
+ 
+-   if (q_old != q_first)
++   if (q_run)
+      {
+       /* At least one timer has run */
+       q_run->next = NULL;     /* Terminate expired timer list */
+ 
+       /* Re-schedule/remove timers that have run */
+-      for (timer = q_old; timer; timer = q_old)
++      q_run = q_new;          /* Swap q_first and q_new ... */
++      q_new = q_first;        /* q_new are the new added timers */
++      q_first = q_run;        /* q_first is now the timer queue */
++      for (timer = q_old; timer; timer = q_run)
+         {
+-           q_old = timer->next;
++           q_run = timer->next;
+            if (timer->again)
+              {
+                 timer->at_time += timer->in_time;
+@@ -151,6 +166,17 @@ TimersRun(unsigned int t_ms)
+                 _TimerDel(timer);
+              }
+         }
++
++      /* Schedule timers that have been added */
++      for (timer = q_new; timer; timer = q_run)
++        {
++           q_run = timer->next;
++           _TimerSet(timer);  /* Add to timer queue */
++        }
++     }
++   else
++     {
++      q_first = q_old;        /* Restore timer queue */
+      }
+ 
+    if (EDebug(EDBUG_TYPE_TIMERS) > 1)
+@@ -160,6 +186,8 @@ TimersRun(unsigned int t_ms)
+                  timer, timer->func, timer->data, timer->at_time - t_ms,
+                  timer->in_time);
+      }
++
++   Dprintf("%s - B\n", __func__);
+ }
+ 
+ int



Home | Main Index | Thread Index | Old Index