mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
make schedule_run return if it has active jobs to schedule
svn path=/trunk/netsurf/; revision=6447
This commit is contained in:
parent
5060882795
commit
cbf07e1bc3
@ -115,7 +115,7 @@ void schedule_remove(void (*callback)(void *p), void *p)
|
||||
* Process events up to current time.
|
||||
*/
|
||||
|
||||
void schedule_run(void)
|
||||
bool schedule_run(void)
|
||||
{
|
||||
struct nsObject *node;
|
||||
struct nsObject *nnode;
|
||||
@ -124,7 +124,7 @@ void schedule_run(void)
|
||||
void *p;
|
||||
struct timeval tv;
|
||||
|
||||
if(IsMinListEmpty(schedule_list)) return;
|
||||
if(IsMinListEmpty(schedule_list)) return false;
|
||||
|
||||
GetSysTime(&tv);
|
||||
|
||||
@ -148,6 +148,8 @@ void schedule_run(void)
|
||||
}
|
||||
}
|
||||
} while(node=nnode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ami_remove_timer_event(struct nscallback *nscb)
|
||||
|
@ -202,7 +202,7 @@ void tree_set_node_sprite_folder(struct node *node) {}
|
||||
#ifndef riscos
|
||||
void schedule(int t, void (*callback)(void *p), void *p) {}
|
||||
void schedule_remove(void (*callback)(void *p), void *p) {}
|
||||
void schedule_run(void) {}
|
||||
bool schedule_run(void) {}
|
||||
#endif
|
||||
|
||||
bool selection_highlighted(struct selection *s, unsigned start, unsigned end,
|
||||
|
@ -265,7 +265,7 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap,
|
||||
/* In platform specific schedule.c. */
|
||||
void schedule(int t, void (*callback)(void *p), void *p);
|
||||
void schedule_remove(void (*callback)(void *p), void *p);
|
||||
void schedule_run(void);
|
||||
bool schedule_run(void);
|
||||
|
||||
/* In platform specific theme_install.c. */
|
||||
#ifdef WITH_THEME_INSTALL
|
||||
|
@ -126,7 +126,7 @@ void schedule_remove(void (*callback)(void *p), void *p)
|
||||
* Process events up to current time.
|
||||
*/
|
||||
|
||||
void schedule_run(void)
|
||||
bool schedule_run(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct nscallback *cur_nscb;
|
||||
@ -134,7 +134,7 @@ void schedule_run(void)
|
||||
struct nscallback *unlnk_nscb;
|
||||
|
||||
if (schedule_list == NULL)
|
||||
return;
|
||||
return false;
|
||||
|
||||
cur_nscb = schedule_list;
|
||||
prev_nscb = NULL;
|
||||
@ -167,7 +167,7 @@ void schedule_run(void)
|
||||
cur_nscb = prev_nscb->next;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void list_schedule(void)
|
||||
|
@ -107,14 +107,14 @@ schedule(int t, void (*callback)(void *p), void *p)
|
||||
g_timeout_add(msec_timeout, nsgtk_schedule_generic_callback, cb);
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
schedule_run(void)
|
||||
{
|
||||
/* Capture this run of pending callbacks into the list. */
|
||||
this_run = pending_callbacks;
|
||||
|
||||
if (this_run == NULL)
|
||||
return; /* Nothing to do */
|
||||
return false; /* Nothing to do */
|
||||
|
||||
/* Clear the pending list. */
|
||||
pending_callbacks = NULL;
|
||||
@ -129,4 +129,5 @@ schedule_run(void)
|
||||
cb->callback(cb->context);
|
||||
free(cb);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void schedule_remove(void (*callback)(void *p), void *p)
|
||||
* Process events up to current time.
|
||||
*/
|
||||
|
||||
void schedule_run(void)
|
||||
bool schedule_run(void)
|
||||
{
|
||||
struct sched_entry *entry;
|
||||
void (*callback)(void *p);
|
||||
@ -153,4 +153,6 @@ void schedule_run(void)
|
||||
sched_time = sched_queue.next->time;
|
||||
} else
|
||||
sched_active = false;
|
||||
|
||||
return sched_active;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user