Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/ab7e5c293677ef736064b0e222c2b9ed5b654f12
...commit
http://git.netsurf-browser.org/netsurf.git/commit/ab7e5c293677ef736064b0e222c2b9ed5b654f12
...tree
http://git.netsurf-browser.org/netsurf.git/tree/ab7e5c293677ef736064b0e222c2b9ed5b654f12
The branch, master has been updated
via ab7e5c293677ef736064b0e222c2b9ed5b654f12 (commit)
from 68b20a382d3c2fe23ebdd152ed39c0290bcc6fa7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=ab7e5c293677ef736064b0e222c2b9ed5b654f12
commit ab7e5c293677ef736064b0e222c2b9ed5b654f12
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Don't Abort/WaitIO when we've already removed it from the message queue
(thx Georg)
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index ff93e90..1fa2658 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -159,11 +159,12 @@ static nserror ami_schedule_reschedule(struct nscallback
*nscb, int t)
*
* \param callback callback function
* \param p user parameter, passed to callback function
+ * \param abort abort pending timer
*
* All scheduled callbacks matching both callback and p are removed.
*/
-static nserror schedule_remove(void (*callback)(void *p), void *p)
+static nserror schedule_remove(void (*callback)(void *p), void *p, bool abort)
{
struct nscallback *nscb;
@@ -171,7 +172,7 @@ static nserror schedule_remove(void (*callback)(void *p),
void *p)
if(nscb != NULL) {
LOG("deleted callback %p", nscb);
- ami_schedule_remove_timer_event(nscb);
+ if(abort == true) ami_schedule_remove_timer_event(nscb);
FreeSysObject(ASOT_IOREQUEST, nscb);
pblHeapConstruct(schedule_list);
}
@@ -232,6 +233,11 @@ static void ami_schedule_dump(void)
LOG("nscb: %p, at %d-%d-%d %d:%d:%d.%d, callback: %p, %p",
nscb, clockdata.mday, clockdata.month, clockdata.year,
clockdata.hour, clockdata.min, clockdata.sec,
nscb->tv.Microseconds, nscb->callback, nscb->p);
+ if(CheckIO((struct IORequest *)nscb) == NULL) {
+ LOG("-> ACTIVE");
+ } else {
+ LOG("-> COMPLETE");
+ }
};
pblIteratorFree(iterator);
@@ -260,7 +266,7 @@ static bool ami_scheduler_run(struct nscallback *nscb)
callback = nscb->callback;
p = nscb->p;
- schedule_remove(callback, p); /* this does a lookup as we don't know if
we're the first item on the heap */
+ schedule_remove(callback, p, false); /* this does a lookup as we don't
know if we're the first item on the heap */
LOG("Running scheduled callback %p with arg %p", callback, p);
callback(p);
@@ -332,7 +338,7 @@ nserror ami_schedule(int t, void (*callback)(void *p), void
*p)
LOG("Scheduling callback %p with arg %p at time %d", callback, p, t);
if(schedule_list == NULL) return NSERROR_INIT_FAILED;
- if(t < 0) return schedule_remove(callback, p);
+ if(t < 0) return schedule_remove(callback, p, true);
if ((nscb = ami_schedule_locate(callback, p, false))) {
return ami_schedule_reschedule(nscb, t);
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/schedule.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index ff93e90..1fa2658 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -159,11 +159,12 @@ static nserror ami_schedule_reschedule(struct nscallback
*nscb, int t)
*
* \param callback callback function
* \param p user parameter, passed to callback function
+ * \param abort abort pending timer
*
* All scheduled callbacks matching both callback and p are removed.
*/
-static nserror schedule_remove(void (*callback)(void *p), void *p)
+static nserror schedule_remove(void (*callback)(void *p), void *p, bool abort)
{
struct nscallback *nscb;
@@ -171,7 +172,7 @@ static nserror schedule_remove(void (*callback)(void *p),
void *p)
if(nscb != NULL) {
LOG("deleted callback %p", nscb);
- ami_schedule_remove_timer_event(nscb);
+ if(abort == true) ami_schedule_remove_timer_event(nscb);
FreeSysObject(ASOT_IOREQUEST, nscb);
pblHeapConstruct(schedule_list);
}
@@ -232,6 +233,11 @@ static void ami_schedule_dump(void)
LOG("nscb: %p, at %d-%d-%d %d:%d:%d.%d, callback: %p, %p",
nscb, clockdata.mday, clockdata.month, clockdata.year,
clockdata.hour, clockdata.min, clockdata.sec,
nscb->tv.Microseconds, nscb->callback, nscb->p);
+ if(CheckIO((struct IORequest *)nscb) == NULL) {
+ LOG("-> ACTIVE");
+ } else {
+ LOG("-> COMPLETE");
+ }
};
pblIteratorFree(iterator);
@@ -260,7 +266,7 @@ static bool ami_scheduler_run(struct nscallback *nscb)
callback = nscb->callback;
p = nscb->p;
- schedule_remove(callback, p); /* this does a lookup as we don't know if
we're the first item on the heap */
+ schedule_remove(callback, p, false); /* this does a lookup as we don't
know if we're the first item on the heap */
LOG("Running scheduled callback %p with arg %p", callback, p);
callback(p);
@@ -332,7 +338,7 @@ nserror ami_schedule(int t, void (*callback)(void *p), void
*p)
LOG("Scheduling callback %p with arg %p at time %d", callback, p, t);
if(schedule_list == NULL) return NSERROR_INIT_FAILED;
- if(t < 0) return schedule_remove(callback, p);
+ if(t < 0) return schedule_remove(callback, p, true);
if ((nscb = ami_schedule_locate(callback, p, false))) {
return ami_schedule_reschedule(nscb, t);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org