mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Oops! Remove a tight-looping diagnostic.
I temporarily applied it as a means of testing the revised event loops
in r10040, and accidentally folded it into my final commit instead of
backing it out. Ahem.
[originally from svn r10042]
[r10040 == 5c4ce2fadf
]
This commit is contained in:
parent
b961cfaa8d
commit
a3d069d2c1
20
callback.c
20
callback.c
@ -26,28 +26,10 @@ void request_callback_notifications(toplevel_callback_notify_fn_t fn,
|
|||||||
frontend = fr;
|
frontend = fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stoat_callback(void *ctx)
|
|
||||||
{
|
|
||||||
static int stoat = 0;
|
|
||||||
if (++stoat % 1000 == 0)
|
|
||||||
debug(("stoat %d\n", stoat));
|
|
||||||
queue_toplevel_callback(stoat_callback, NULL);
|
|
||||||
}
|
|
||||||
void queue_stoat(void)
|
|
||||||
{
|
|
||||||
static int stoat = 0;
|
|
||||||
if (!stoat) {
|
|
||||||
stoat = 1;
|
|
||||||
queue_toplevel_callback(stoat_callback, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void queue_toplevel_callback(toplevel_callback_fn_t fn, void *ctx)
|
void queue_toplevel_callback(toplevel_callback_fn_t fn, void *ctx)
|
||||||
{
|
{
|
||||||
struct callback *cb;
|
struct callback *cb;
|
||||||
|
|
||||||
queue_stoat();
|
|
||||||
|
|
||||||
cb = snew(struct callback);
|
cb = snew(struct callback);
|
||||||
cb->fn = fn;
|
cb->fn = fn;
|
||||||
cb->ctx = ctx;
|
cb->ctx = ctx;
|
||||||
@ -68,7 +50,6 @@ void queue_toplevel_callback(toplevel_callback_fn_t fn, void *ctx)
|
|||||||
|
|
||||||
void run_toplevel_callbacks(void)
|
void run_toplevel_callbacks(void)
|
||||||
{
|
{
|
||||||
queue_stoat();
|
|
||||||
if (cbhead) {
|
if (cbhead) {
|
||||||
struct callback *cb = cbhead;
|
struct callback *cb = cbhead;
|
||||||
/*
|
/*
|
||||||
@ -89,6 +70,5 @@ void run_toplevel_callbacks(void)
|
|||||||
|
|
||||||
int toplevel_callback_pending(void)
|
int toplevel_callback_pending(void)
|
||||||
{
|
{
|
||||||
queue_stoat();
|
|
||||||
return cbhead != NULL;
|
return cbhead != NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user