/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-1999 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* ev_waits.c - implement deferred function calls for the eventlib
* vix 05dec95 [initial]
*/
#if !defined(LINT) && !defined(CODECENTER)
#endif
#include "port_before.h"
#include "fd_setsize.h"
#include <errno.h>
#include <isc/eventlib.h>
#include <isc/assertions.h>
#include "eventlib_p.h"
#include "port_after.h"
/* Forward. */
/* Public. */
/*%
* Enter a new wait function on the queue.
*/
int
{
else
return (0);
}
/*%
* Mark runnable all waiting functions having a certain tag.
*/
int
if (!wl) {
return (-1);
}
else
return (0);
}
/*%
* Remove a waiting (or ready to run) function from the queue.
*/
int
int found = 0;
found = 1;
else
break;
}
}
if (!found) {
/* Maybe it's done */
found = 1;
else
break;
}
}
if (!found) {
return (-1);
}
return (0);
}
int
else
return (0);
}
/* Private. */
static void
}
}
static evWaitList *
return (NULL);
return (new);
}
static void
else
}
static evWaitList *
break;
}
return (this);
}
/*! \file */