GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
MAINT_FREQUENCY, &maint, cfg);
/* check for services that died (WAITPID) */
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
MAINT_FREQUENCY, &maint, NULL);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmission request timed out.\n");
h = th->ch;
- th->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (0 == th->get_message (th->get_message_cls, 0, NULL));
GNUNET_CORE_notify_transmit_ready_cancel (th);
}
th->timeout_task = GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining
(th->timeout),
&timeout_request, th);
return; /* no requests pending */
GNUNET_assert (NULL == h->th);
GNUNET_SCHEDULER_cancel (h->sched, th->timeout_task);
- th->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
h->th = GNUNET_CLIENT_notify_transmit_ready (h->client,
th->msize,
GNUNET_TIME_absolute_get_remaining
reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_CORE_Handle *h = cls;
- h->reconnect_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
reconnect (h);
}
h->reconnect_task =
GNUNET_SCHEDULER_add_delayed (h->sched, GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
delay, &reconnect_task, h);
return 0;
}
{
if (handle->th != NULL)
GNUNET_NETWORK_notify_transmit_ready_cancel (handle->th);
- if (handle->reconnect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
GNUNET_CLIENT_disconnect (handle->client);
GNUNET_free (handle);
/* communicate handle timeout/error! */
if (th->info != NULL)
th->info (th->info_cls, NULL, 0, 0, GNUNET_TIME_UNIT_ZERO, 0, 0.0);
- if (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_CORE_notify_transmit_ready_cancel (th);
if (ch->submitted == th)
ch->submitted = NULL;
th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout,
&timeout_request, th);
th->msize = sizeof (struct RequestConfigureMessage);
GNUNET_i2s(&th->peer));
#endif
GNUNET_assert (0 == th->notify (th->notify_cls, 0, NULL));
- if (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_CORE_notify_transmit_ready_cancel (th);
trigger_next_request (h);
return 0;
"Preparing for P2P transmission to `%4s'.\n",
GNUNET_i2s(&th->peer));
#endif
- GNUNET_assert (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (th->timeout_task != GNUNET_SCHEDULER_NO_TASK);
sm = (struct SendMessage *) buf;
sm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_SEND);
sm->priority = htonl (th->priority);
th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
maxdelay,
&timeout_request, th);
th->priority = priority;
else
h->next->prev = h->prev;
}
- if (h->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (h->timeout_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (handle->sched, h->timeout_task);
GNUNET_free (h);
}
{
struct Neighbour *n = cls;
- n->retry_plaintext_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->retry_plaintext_task = GNUNET_SCHEDULER_NO_TASK;
process_plaintext_neighbour_queue (n);
}
struct GNUNET_TIME_Absolute deadline;
struct GNUNET_TIME_Relative retry_time;
- if (n->retry_plaintext_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->retry_plaintext_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sched, n->retry_plaintext_task);
- n->retry_plaintext_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->retry_plaintext_task = GNUNET_SCHEDULER_NO_TASK;
}
switch (n->status)
{
return;
case PEER_STATE_KEY_SENT:
GNUNET_assert (n->retry_set_key_task !=
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_SCHEDULER_NO_TASK);
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Not yet connected to `%4s', deferring processing of plaintext messages.\n",
return;
case PEER_STATE_KEY_RECEIVED:
GNUNET_assert (n->retry_set_key_task !=
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_SCHEDULER_NO_TASK);
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Not yet connected to `%4s', deferring processing of plaintext messages.\n",
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
retry_time,
&retry_plaintext_processing, n);
return;
struct Neighbour *n = cls;
GNUNET_assert (n->status != PEER_STATE_KEY_CONFIRMED);
- n->retry_set_key_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK;
n->set_key_retry_frequency =
GNUNET_TIME_relative_multiply (n->set_key_retry_frequency, 2);
send_key (n);
= GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
n->set_key_retry_frequency,
&set_key_retry_task, n);
}
return;
case PEER_STATE_KEY_RECEIVED:
n->status = PEER_STATE_KEY_CONFIRMED;
- if (n->retry_set_key_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->retry_set_key_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sched, n->retry_set_key_task);
- n->retry_set_key_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK;
}
process_encrypted_neighbour_queue (n);
break;
schedule_quota_update (struct Neighbour *n)
{
GNUNET_assert (n->quota_update_task ==
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_SCHEDULER_NO_TASK);
n->quota_update_task
= GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
QUOTA_UPDATE_FREQUENCY,
&neighbour_quota_update,
n);
double share;
unsigned long long distributable;
- n->quota_update_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->quota_update_task = GNUNET_SCHEDULER_NO_TASK;
/* calculate relative preference among all neighbours;
divides by a bit more to avoid division by zero AND to
account for possibility of new neighbours joining any time
}
if (NULL != n->th)
GNUNET_TRANSPORT_notify_transmit_ready_cancel (n->th);
- if (n->retry_plaintext_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->retry_plaintext_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sched, n->retry_plaintext_task);
- if (n->retry_set_key_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->retry_set_key_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sched, n->retry_set_key_task);
- if (n->quota_update_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->quota_update_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sched, n->quota_update_task);
GNUNET_free_non_null (n->public_key);
GNUNET_free_non_null (n->pending_ping);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
&cleaning_task, NULL);
/* process client requests */
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_ZERO, &terminate_task, NULL);
return GNUNET_OK;
}
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_MINUTES, &terminate_task_error, NULL);
return sizeof (struct GNUNET_MessageHeader);
* @file datastore/gnunet-service-datastore.c
* @brief Management for the datastore for files stored on a GNUnet node
* @author Christian Grothoff
- *
- * TODO:
- * quota management code:
- * - track storage use
- * - refuse above-quota
- * - content expiration job
- * - near-quota low-priority content discard job
*/
#include "platform.h"
*/
#define MAX_PENDING 1024
+/**
+ * How long are we at most keeping "expired" content
+ * past the expiration date in the database?
+ */
+#define MAX_EXPIRE_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15)
+
+
/**
* Our datastore plugin.
*/
static unsigned long long quota;
+/**
+ * How much space are we using for the cache?
+ * (space available for insertions that will be
+ * instantly reclaimed by discarding less
+ * important content --- or possibly whatever
+ * we just inserted into the "cache").
+ */
+static unsigned long long cache_size;
+
/**
* How much space have we currently reserved?
*/
static unsigned long long reserved;
+/**
+ * Identity of the task that is used to delete
+ * expired content.
+ */
+static GNUNET_SCHEDULER_TaskIdentifier expired_kill_task;
+
+/**
+ * Our configuration.
+ */
+struct GNUNET_CONFIGURATION_Handle *cfg;
+
+/**
+ * Our scheduler.
+ */
+struct GNUNET_SCHEDULER_Handle *sched;
/**
* Function called once the transmit operation has
typedef void (*TransmitContinuation)(void *cls,
int status);
+
struct TransmitCallbackContext
{
/**
};
+/**
+ * Task that is used to remove expired entries from
+ * the datastore. This task will schedule itself
+ * again automatically to always delete all expired
+ * content quickly.
+ *
+ * @param cls not used
+ * @param tc task context
+ */
+static void
+delete_expired (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
+
+
+/**
+ * Iterate over the expired items stored in the datastore.
+ * Delete all expired items; once we have processed all
+ * expired items, re-schedule the "delete_expired" task.
+ *
+ * @param cls not used
+ * @param next_cls closure to pass to the "next" function.
+ * @param key key for the content
+ * @param size number of bytes in data
+ * @param data content stored
+ * @param type type of the content
+ * @param priority priority of the content
+ * @param anonymity anonymity-level for the content
+ * @param expiration expiration time for the content
+ * @param uid unique identifier for the datum;
+ * maybe 0 if no unique identifier is available
+ *
+ * @return GNUNET_SYSERR to abort the iteration, GNUNET_OK to continue
+ * (continue on call to "next", of course),
+ * GNUNET_NO to delete the item and continue (if supported)
+ */
+static int
+expired_processor (void *cls,
+ void *next_cls,
+ const GNUNET_HashCode * key,
+ uint32_t size,
+ const void *data,
+ uint32_t type,
+ uint32_t priority,
+ uint32_t anonymity,
+ struct GNUNET_TIME_Absolute
+ expiration,
+ uint64_t uid)
+{
+ struct GNUNET_TIME_Absolute now;
+
+ expired_kill_task = GNUNET_SCHEDULER_NO_TASK;
+ if (key == NULL)
+ {
+ expired_kill_task
+ = GNUNET_SCHEDULER_add_delayed (sched,
+ GNUNET_NO,
+ GNUNET_SCHEDULER_PRIORITY_IDLE,
+ GNUNET_SCHEDULER_NO_TASK,
+ MAX_EXPIRE_DELAY,
+ &delete_expired,
+ NULL);
+ return GNUNET_SYSERR;
+ }
+ now = GNUNET_TIME_absolute_get ();
+ if (expiration.value > now.value)
+ {
+ /* finished processing */
+ plugin->api->next_request (next_cls, GNUNET_YES);
+ return GNUNET_SYSERR;
+ }
+ plugin->api->next_request (next_cls, GNUNET_NO);
+ return GNUNET_NO; /* delete */
+}
+
+
+/**
+ * Task that is used to remove expired entries from
+ * the datastore. This task will schedule itself
+ * again automatically to always delete all expired
+ * content quickly.
+ *
+ * @param cls not used
+ * @param tc task context
+ */
+static void
+delete_expired (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ plugin->api->iter_ascending_expiration (plugin->api->cls,
+ 0,
+ &expired_processor,
+ NULL);
+}
+
+
+/**
+ * An iterator over a set of items stored in the datastore.
+ *
+ * @param cls closure
+ * @param next_cls closure to pass to the "next" function.
+ * @param key key for the content
+ * @param size number of bytes in data
+ * @param data content stored
+ * @param type type of the content
+ * @param priority priority of the content
+ * @param anonymity anonymity-level for the content
+ * @param expiration expiration time for the content
+ * @param uid unique identifier for the datum;
+ * maybe 0 if no unique identifier is available
+ *
+ * @return GNUNET_SYSERR to abort the iteration, GNUNET_OK to continue
+ * (continue on call to "next", of course),
+ * GNUNET_NO to delete the item and continue (if supported)
+ */
+static int
+manage (void *cls,
+ void *next_cls,
+ const GNUNET_HashCode * key,
+ uint32_t size,
+ const void *data,
+ uint32_t type,
+ uint32_t priority,
+ uint32_t anonymity,
+ struct GNUNET_TIME_Absolute
+ expiration,
+ uint64_t uid)
+{
+ unsigned long long *need = cls;
+
+ if (NULL == key)
+ {
+ GNUNET_free (need);
+ return GNUNET_SYSERR;
+ }
+ if (size + GNUNET_DATASTORE_ENTRY_OVERHEAD > *need)
+ *need = 0;
+ else
+ *need -= size + GNUNET_DATASTORE_ENTRY_OVERHEAD;
+ plugin->api->next_request (next_cls,
+ (0 == *need) ? GNUNET_YES : GNUNET_NO);
+ return GNUNET_NO;
+}
+
+
+/**
+ * Manage available disk space by running tasks
+ * that will discard content if necessary. This
+ * function will be run whenever a request for
+ * "need" bytes of storage could only be satisfied
+ * by eating into the "cache" (and we want our cache
+ * space back).
+ *
+ * @param need number of bytes of content that were
+ * placed into the "cache" (and hence the
+ * number of bytes that should be removed).
+ */
+static void
+manage_space (unsigned long long need)
+{
+ unsigned long long *n;
+
+ n = GNUNET_malloc (sizeof(unsigned long long));
+ *n = need;
+ plugin->api->iter_low_priority (plugin->api->cls,
+ 0,
+ &manage,
+ n);
+}
+
+
/**
* Function called to notify a client about the socket
* begin ready to queue more data. "buf" will be
if (used + req > quota)
{
if (quota < used)
- used = quota; /* cheat a bit */
+ used = quota; /* cheat a bit for error message (to avoid negative numbers) */
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Insufficient space (%llu bytes are available) to satisfy `%s' request for %llu bytes\n"),
quota - used,
"RESERVE",
req);
- transmit_status (client, 0, gettext_noop ("Insufficient space to satisfy request"));
+ if (cache_size < req)
+ {
+ /* TODO: document this in the FAQ; essentially, if this
+ message happens, the insertion request could be blocked
+ by less-important content from migration because it is
+ larger than 1/8th of the overall available space, and
+ we only reserve 1/8th for "fresh" insertions */
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("The requested amount (%llu bytes) is larger than the cache size (%llu bytes)\n"),
+ req,
+ cache_size);
+ transmit_status (client, 0,
+ gettext_noop ("Insufficient space to satisfy request and "
+ "requested amount is larger than cache size"));
+ }
+ else
+ {
+ transmit_status (client, 0,
+ gettext_noop ("Insufficient space to satisfy request"));
+ }
return;
}
reserved += req;
(GNUNET_SYSERR == ret) ? GNUNET_SYSERR : GNUNET_OK,
msg);
GNUNET_free_non_null (msg);
+ if (quota - reserved - cache_size < plugin->api->get_size (plugin->api->cls))
+ manage_space (size + GNUNET_DATASTORE_ENTRY_OVERHEAD);
}
* Load the datastore plugin.
*/
static struct DatastorePlugin *
-load_plugin (struct GNUNET_CONFIGURATION_Handle *cfg,
- struct GNUNET_SCHEDULER_Handle *sched)
+load_plugin ()
{
struct DatastorePlugin *ret;
char *libname;
struct GNUNET_SERVER_Client
* client)
{
- /* FIXME */
+ struct ReservationList *pos;
+ struct ReservationList *prev;
+ struct ReservationList *next;
+
+ prev = NULL;
+ pos = reservations;
+ while (NULL != pos)
+ {
+ next = pos->next;
+ if (pos->client == client)
+ {
+ if (prev == NULL)
+ reservations = next;
+ else
+ prev->next = next;
+ reserved -= pos->amount + pos->entries * GNUNET_DATASTORE_ENTRY_OVERHEAD;
+ GNUNET_free (pos);
+ }
+ else
+ {
+ prev = pos;
+ }
+ pos = next;
+ }
}
* Process datastore requests.
*
* @param cls closure
- * @param sched scheduler to use
+ * @param s scheduler to use
* @param server the initialized server
- * @param cfg configuration to use
+ * @param c configuration to use
*/
static void
run (void *cls,
- struct GNUNET_SCHEDULER_Handle *sched,
+ struct GNUNET_SCHEDULER_Handle *s,
struct GNUNET_SERVER_Handle *server,
- struct GNUNET_CONFIGURATION_Handle *cfg)
+ struct GNUNET_CONFIGURATION_Handle *c)
{
char *fn;
unsigned int bf_size;
+ sched = s;
+ cfg = c;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg,
"DATASTORE", "QUOTA", "a))
"DATASTORE");
return;
}
+ cache_size = quota / 8; /* Or should we make this an option? */
bf_size = quota / 32; /* 8 bit per entry, 1 bit per 32 kb in DB */
fn = NULL;
if ( (GNUNET_OK !=
_("Failed to initialize bloomfilter.\n"));
return;
}
- plugin = load_plugin (cfg, sched);
+ plugin = load_plugin ();
if (NULL == plugin)
{
GNUNET_CONTAINER_bloomfilter_free (filter);
}
GNUNET_SERVER_disconnect_notify (server, &cleanup_reservations, NULL);
GNUNET_SERVER_add_handlers (server, handlers);
+ expired_kill_task
+ = GNUNET_SCHEDULER_add_delayed (sched,
+ GNUNET_NO,
+ GNUNET_SCHEDULER_PRIORITY_IDLE,
+ GNUNET_SCHEDULER_NO_TASK,
+ GNUNET_TIME_UNIT_ZERO,
+ &delete_expired, NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
&cleaning_task, NULL);
+
}
GNUNET_SCHEDULER_add_after (crc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&do_delete,
crc);
return;
GNUNET_SCHEDULER_add_after (crc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&test, crc);
return GNUNET_OK;
}
GNUNET_SCHEDULER_add_after (crc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&test, crc);
break;
case RP_LP_GET:
GNUNET_SCHEDULER_add_delayed (crc->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_ZERO,
&cleaning_task, crc);
break;
GNUNET_SCHEDULER_add_after (s,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&test, crc);
}
if (GNUNET_YES == end_it)
nc->end_it = GNUNET_YES;
GNUNET_SCHEDULER_add_continuation (nc->plugin->env->sched,
- GNUNET_NO,
+ GNUNET_NO,
&sqlite_next_request_cont,
nc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
&cleaning_task, NULL);
}
= GNUNET_SCHEDULER_add_select (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_MINUTES,
max,
&rs,
current_task = GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
delay,
&check_task,
NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
RESPONSE_UPDATE_FREQUENCY,
&update_response,
NULL);
= GNUNET_SCHEDULER_add_select (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
tv,
max,
&rs,
GNUNET_HOSTLIST_server_stop ()
{
GNUNET_SCHEDULER_cancel (sched, hostlist_task);
- hostlist_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ hostlist_task = GNUNET_SCHEDULER_NO_TASK;
MHD_stop_daemon (daemon_handle);
daemon_handle = NULL;
}
* @param timeout maximum amount of time to wait
* @param receiver function to call with received data
* @param receiver_cls closure for receiver
- * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_PREREQUISITE_TASK on error
+ * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_TASK on error
*/
GNUNET_SCHEDULER_TaskIdentifier
GNUNET_NETWORK_receive (struct GNUNET_NETWORK_SocketHandle *sock,
* Constant used to indicate that the scheduled
* task has no others as prerequisites.
*/
-#define GNUNET_SCHEDULER_NO_PREREQUISITE_TASK ((GNUNET_SCHEDULER_TaskIdentifier) 0)
+#define GNUNET_SCHEDULER_NO_TASK ((GNUNET_SCHEDULER_TaskIdentifier) 0)
/**
* Reasons why the schedule may have triggered
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param main main function of the task
* @param cls closure of task
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param main main function of the task
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param rfd read file-descriptor
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param wfd write file-descriptor
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param nfds highest-numbered file descriptor in any of the two sets plus one
* @param receiver function to call with received data
* @param receiver_cls closure for receiver
* @return task identifier that can be used to cancel the receive,
- * GNUNET_SCHEDULER_NO_PREREQUISITE_TASK should be returned
+ * GNUNET_SCHEDULER_NO_TASK should be returned
* if the receiver function was already called
*/
typedef GNUNET_SCHEDULER_TaskIdentifier
GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
DATA_HOST_FREQ,
&cron_scan_directory_data_hosts, NULL);
}
GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
TRUST_FLUSH_FREQ, &cron_flush_trust, NULL);
}
GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
DATA_HOST_CLEAN_FREQ,
&cron_clean_data_hosts, NULL);
}
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_MILLISECONDS,
&cron_scan_directory_data_hosts, NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
TRUST_FLUSH_FREQ, &cron_flush_trust, NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
DATA_HOST_CLEAN_FREQ,
&cron_clean_data_hosts, NULL);
GNUNET_SERVER_add_handlers (server, handlers);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
delay,
&find_more_peers,
NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_SECONDS /* give core time to tell us about existing connections */,
&find_more_peers,
NULL);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
&cleaning_task, NULL);
}
struct AddressList *next;
int expired;
- if (plugin->address_update_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (plugin->address_update_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (plugin->env.sched, plugin->address_update_task);
- plugin->address_update_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK;
now = GNUNET_TIME_absolute_get ();
min_remaining = GNUNET_TIME_UNIT_FOREVER_REL;
expired = GNUNET_NO;
= GNUNET_SCHEDULER_add_delayed (plugin->env.sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
min_remaining,
&expire_address_task, plugin);
expire_address_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct TransportPlugin *plugin = cls;
- plugin->address_update_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK;
update_addresses (plugin, GNUNET_NO);
}
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining
(pos->timeout), &cleanup_validation, NULL);
}
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_ZERO,
&cleanup_validation, NULL);
}
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining
(chvc->e->timeout), &cleanup_validation,
NULL);
GNUNET_assert (mq->neighbour == n);
GNUNET_free (mq);
}
- if (n->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (n->timeout_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sched,
n->timeout_task);
/* finally, free n itself */
"Neighbour `%4s' has timed out!\n",
GNUNET_i2s(&n->id));
#endif
- n->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ n->timeout_task = GNUNET_SCHEDULER_NO_TASK;
disconnect_neighbour (n, GNUNET_NO);
}
n->timeout_task = GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
&neighbour_timeout_task, n);
transmit_to_peer (NULL, 0,
n->timeout_task =
GNUNET_SCHEDULER_add_delayed (sched, GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
&neighbour_timeout_task, n);
update_quota (n);
GNUNET_SCHEDULER_add_delayed (session->plugin->env->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
delay, &delayed_done, session);
}
/* Sailor: 'test_validation' should get here
if the validation worked; so we cancel the
"delayed" task that will cause failure */
- if (validation_timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (validation_timeout_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sched, validation_timeout_task);
- validation_timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ validation_timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
GNUNET_assert (challenge == 42);
validation_failed (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- validation_timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ validation_timeout_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_break (0); /* output error */
/* the "validation_notification" was not called
in a timely fashion; we should set an error
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
TIMEOUT,
&validation_failed,
NULL);
do
{
th = h->connect_ready_head;
- if (th->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
/* remove existing time out task (only applies if
this is not the first iteration of the loop) */
GNUNET_SCHEDULER_cancel (h->sched,
th->notify_delay_task);
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
GNUNET_assert (th->notify_size <= size);
if (th->next != NULL)
th = h->connect_ready_head;
if (th == NULL)
return; /* no request pending */
- if (th->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
/* remove existing time out task, will be integrated
with transmit_ready notification! */
GNUNET_SCHEDULER_cancel (h->sched,
th->notify_delay_task);
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
h->transmission_scheduled = GNUNET_YES;
h->network_handle = GNUNET_CLIENT_notify_transmit_ready (h->client,
struct GNUNET_TRANSPORT_Handle *h;
h = th->handle;
- if (th->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (h->sched, th->notify_delay_task);
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
if (th->prev == NULL)
{
{
struct GNUNET_TRANSPORT_TransmitHandle *th = cls;
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
if (th->neighbour != NULL)
th->neighbour->transmit_handle = NULL;
#if DEBUG_TRANSPORT
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout,
&transmit_timeout, th);
if (at_head)
struct HelloWaitList *pos;
struct HelloWaitList *prev;
- hwl->task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ hwl->task = GNUNET_SCHEDULER_NO_TASK;
if (GNUNET_TIME_absolute_get_remaining (hwl->timeout).value > 0)
{
#if DEBUG_TRANSPORT
hwl->task = GNUNET_SCHEDULER_add_delayed (hwl->handle->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining (hwl->timeout),
&hello_wait_timeout, hwl);
return;
hwl->task = GNUNET_SCHEDULER_add_delayed (handle->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout,
&hello_wait_timeout, hwl);
return;
struct TryConnectMessage *tcm;
struct GNUNET_TRANSPORT_Handle *h;
- GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_TASK);
h = th->handle;
if (buf == NULL)
{
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining
(th->timeout),
&transmit_timeout, th);
static void
try_connect (struct GNUNET_TRANSPORT_TransmitHandle *th)
{
- GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_TASK);
schedule_control_transmit (th->handle,
sizeof (struct TryConnectMessage),
GNUNET_NO,
{
struct GNUNET_TRANSPORT_TransmitHandle *th = cls;
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
try_connect (th);
}
if (GNUNET_TIME_absolute_get_remaining (th->timeout).value <= CONNECT_RETRY_TIMEOUT.value)
{
/* signal error */
- GNUNET_assert (GNUNET_SCHEDULER_NO_PREREQUISITE_TASK == th->notify_delay_task);
+ GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == th->notify_delay_task);
transmit_timeout (th, NULL);
}
else
{
/* try again in a bit */
- GNUNET_assert (GNUNET_SCHEDULER_NO_PREREQUISITE_TASK == th->notify_delay_task);
+ GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == th->notify_delay_task);
th->notify_delay_task
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
CONNECT_RETRY_TIMEOUT,
&try_connect_task,
th);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting to transport service.\n");
#endif
GNUNET_assert (h->client == NULL);
- h->reconnect_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
h->client = GNUNET_CLIENT_connect (h->sched, "transport", h->cfg);
GNUNET_assert (h->client != NULL);
/* make sure we don't send "START" twice,
h->reconnect_delay.value);
#endif
GNUNET_assert (h->client == NULL);
- GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK);
h->reconnect_task
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
h->reconnect_delay, &reconnect, h);
h->reconnect_delay = GNUNET_TIME_UNIT_SECONDS;
}
{
struct GNUNET_TRANSPORT_TransmitHandle *th = cls;
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
schedule_request (th);
}
h = th->handle;
n = th->neighbour;
- if (th->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (h->sched, th->notify_delay_task);
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
/* check outgoing quota */
duration = GNUNET_TIME_absolute_get_duration (n->last_quota_update);
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
duration, &transmit_ready, th);
return;
}
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining
(th->timeout), &transmit_timeout, th);
return;
"Found pending request for `%4s' will trigger it now.\n",
GNUNET_i2s (&pos->target));
#endif
- if (pos->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (pos->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (h->sched, pos->notify_delay_task);
- pos->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ pos->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
schedule_request (pos);
}
while (NULL != (th = handle->connect_wait_head))
{
handle->connect_wait_head = th->next;
- if (th->notify_delay_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (handle->sched, th->notify_delay_task);
- th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
th->notify (th->notify_cls, 0, NULL);
GNUNET_free (th);
hwl->rec (hwl->rec_cls, GNUNET_TIME_UNIT_ZERO, NULL, NULL);
GNUNET_free (hwl);
}
- if (handle->reconnect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
- handle->reconnect_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
}
GNUNET_free_non_null (handle->my_hello);
handle->my_hello = NULL;
h->transmission_scheduled = GNUNET_NO;
th = h->connect_ready_head;
/* add timeout again, we cancelled the transmit_ready task! */
- GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (th->notify_delay_task == GNUNET_SCHEDULER_NO_TASK);
th->notify_delay_task
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining(th->timeout),
&transmit_timeout,
th);
GNUNET_SCHEDULER_cancel (h->sched,
n->transmit_handle->notify_delay_task);
n->transmit_handle->notify_delay_task =
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (GNUNET_YES == n->received_ack);
schedule_request (n->transmit_handle);
}
= GNUNET_SCHEDULER_add_delayed (handle->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout, &transmit_timeout, th);
return th;
}
struct GNUNET_TIME_Relative remaining;
GNUNET_assert (conn->msg_complete == GNUNET_NO);
- conn->receiver_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ conn->receiver_task = GNUNET_SCHEDULER_NO_TASK;
if ((available == 0) || (conn->sock == NULL) || (errCode != 0))
{
struct GNUNET_MessageHeader *msg = (struct GNUNET_MessageHeader*) mbuf;
GNUNET_assert (GNUNET_YES == sock->msg_complete);
- sock->receiver_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->receiver_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (sock->received_pos >= msize);
memcpy (msg, cmsg, msize);
memmove (sock->received_buf,
return;
}
GNUNET_assert (sock->receiver_task ==
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_SCHEDULER_NO_TASK);
sock->receiver_handler = handler;
sock->receiver_handler_cls = cls;
sock->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout);
sock->receiver_task = GNUNET_SCHEDULER_add_after (sock->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&receive_task, sock);
else
sock->receiver_task = GNUNET_NETWORK_receive (sock->sock,
GNUNET_SCHEDULER_add_after (tc->sched,
fhc->run_on_shutdown,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&file_hash_task, fhc);
}
GNUNET_SCHEDULER_add_after (sched,
run_on_shutdown,
priority,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&file_hash_task, fhc);
}
GNUNET_SCHEDULER_add_after (iter->sched,
GNUNET_YES,
iter->priority,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&directory_iterator_task, iter);
return GNUNET_YES;
}
int error;
/* nobody needs to wait for us anymore... */
- sock->connect_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->connect_task = GNUNET_SCHEDULER_NO_TASK;
/* Note: write-ready does NOT mean connect succeeded,
we need to use getsockopt to be sure */
len = sizeof (error);
}
sock->connect_task = GNUNET_SCHEDULER_add_write (tc->sched, GNUNET_NO, /* abort on shutdown */
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_NETWORK_CONNECT_RETRY_TIMEOUT,
sock->sock,
&connect_continuation,
}
ret->connect_task = GNUNET_SCHEDULER_add_write (sched, GNUNET_NO, /* abort on shutdown */
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_NETWORK_CONNECT_RETRY_TIMEOUT,
ret->sock,
&connect_continuation, ret);
struct GNUNET_NETWORK_SocketHandle *sock = cls;
GNUNET_NETWORK_TransmitReadyNotify notify;
- if (sock->write_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->write_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_add_after (sock->sched,
GNUNET_YES,
#endif
SHUTDOWN (sock->sock, SHUT_RDWR);
}
- if (sock->read_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->read_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_add_after (sock->sched,
GNUNET_YES,
{
sock->nth.notify_ready = NULL;
notify (sock->nth.notify_ready_cls, 0, NULL);
- if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sock->sched, sock->nth.timeout_task);
- sock->nth.timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
}
if (sock->sock != -1)
ssize_t ret;
GNUNET_NETWORK_Receiver receiver;
- sh->read_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sh->read_task = GNUNET_SCHEDULER_NO_TASK;
now = GNUNET_TIME_absolute_get ();
if ((now.value > sh->receive_timeout.value) ||
(0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) ||
struct GNUNET_NETWORK_SocketHandle *sh = cls;
struct GNUNET_TIME_Absolute now;
- sh->read_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sh->read_task = GNUNET_SCHEDULER_NO_TASK;
if ((sh->sock == -1) &&
- (sh->connect_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK))
+ (sh->connect_task == GNUNET_SCHEDULER_NO_TASK))
{
/* not connected and no longer trying */
#if DEBUG_NETWORK
signal_timeout (sh);
return;
}
- if (sh->connect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sh->connect_task != GNUNET_SCHEDULER_NO_TASK)
{
/* connect was retried */
sh->read_task = GNUNET_SCHEDULER_add_after (tc->sched,
* @param timeout maximum amount of time to wait (use -1 for "forever")
* @param receiver function to call with received data
* @param receiver_cls closure for receiver
- * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_PREREQUISITE_TASK on error
+ * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_TASK on error
*/
GNUNET_SCHEDULER_TaskIdentifier
GNUNET_NETWORK_receive (struct GNUNET_NETWORK_SocketHandle *sock,
{
struct GNUNET_SCHEDULER_TaskContext tc;
- GNUNET_assert ((sock->read_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) &&
+ GNUNET_assert ((sock->read_task == GNUNET_SCHEDULER_NO_TASK) &&
(sock->receiver == NULL));
sock->receiver = receiver;
sock->receiver_cls = receiver_cls;
{
GNUNET_assert (sock->read_task == task);
GNUNET_assert (sock == GNUNET_SCHEDULER_cancel (sock->sched, task));
- sock->read_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->read_task = GNUNET_SCHEDULER_NO_TASK;
sock->receiver = NULL;
return sock->receiver_cls;
}
size_t size;
GNUNET_NETWORK_TransmitReadyNotify notify;
- GNUNET_assert (sock->write_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (sock->write_task == GNUNET_SCHEDULER_NO_TASK);
if (NULL == (notify = sock->nth.notify_ready))
return GNUNET_NO;
used = sock->write_buffer_off - sock->write_buffer_pos;
if (sock->nth.notify_size > avail)
return GNUNET_NO;
sock->nth.notify_ready = NULL;
- if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sock->sched, sock->nth.timeout_task);
- sock->nth.timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
if (sock->write_buffer_size - sock->write_buffer_off < size)
{
{
if (sock->nth.notify_ready == NULL)
return; /* nobody to tell about it */
- if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (sock->sched, sock->nth.timeout_task);
- sock->nth.timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ sock->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
transmit_timeout (sock, NULL);
}
ssize_t ret;
size_t have;
- GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
- sock->write_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
- if (sock->connect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_TASK);
+ sock->write_task = GNUNET_SCHEDULER_NO_TASK;
+ if (sock->connect_task != GNUNET_SCHEDULER_NO_TASK)
{
/* still waiting for connect */
GNUNET_assert (sock->write_task ==
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_SCHEDULER_NO_TASK);
sock->write_task =
GNUNET_SCHEDULER_add_delayed (tc->sched, GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
return; /* all data sent! */
/* not done writing, schedule more */
SCHEDULE_WRITE:
- if (sock->write_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->write_task == GNUNET_SCHEDULER_NO_TASK)
sock->write_task =
GNUNET_SCHEDULER_add_write (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining (sock->nth.transmit_timeout),
sock->sock, &transmit_ready, sock);
}
GNUNET_assert (sock->write_buffer_size >= size);
if ((sock->sock == -1) &&
- (sock->connect_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK))
+ (sock->connect_task == GNUNET_SCHEDULER_NO_TASK))
{
#if DEBUG_NETWORK
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
sock->nth.timeout_task = GNUNET_SCHEDULER_add_delayed (sock->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout,
&transmit_timeout,
sock);
- if (sock->write_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->write_task == GNUNET_SCHEDULER_NO_TASK)
{
- if (sock->connect_task == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (sock->connect_task == GNUNET_SCHEDULER_NO_TASK)
sock->write_task = GNUNET_SCHEDULER_add_write (sock->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_absolute_get_remaining (sock->nth.transmit_timeout),
sock->sock,
&transmit_ready, sock);
{
GNUNET_assert (h->notify_ready != NULL);
GNUNET_SCHEDULER_cancel (h->sh->sched, h->timeout_task);
- h->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ h->timeout_task = GNUNET_SCHEDULER_NO_TASK;
h->notify_ready = NULL;
}
pos = sched->pending;
while (pos != NULL)
{
- if ((pos->prereq_id != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) &&
+ if ((pos->prereq_id != GNUNET_SCHEDULER_NO_TASK) &&
(GNUNET_YES == is_pending (sched, pos->prereq_id)))
{
pos = pos->next;
task->reason |= GNUNET_SCHEDULER_REASON_WRITE_READY;
if (task->reason == 0)
return GNUNET_NO; /* not ready */
- if (task->prereq_id != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK)
+ if (task->prereq_id != GNUNET_SCHEDULER_NO_TASK)
{
if (GNUNET_YES == is_pending (sched, task->prereq_id))
return GNUNET_NO; /* prereq waiting */
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param main main function of the task
* @param cls closure of task
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param main main function of the task
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param rfd read file-descriptor
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param wfd write file-descriptor
* @param prerequisite_task run this task after the task with the given
* task identifier completes (and any of our other
* conditions, such as delay, read or write-readyness
- * are satisfied). Use GNUNET_SCHEDULER_NO_PREREQUISITE_TASK to not have any dependency
+ * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency
* on completion of other tasks.
* @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever"
* @param nfds highest-numbered file descriptor in any of the two sets plus one
/**
* Current task identifier for the receive call
- * (or GNUNET_SCHEDULER_NO_PREREQUISITE_TASK for none).
+ * (or GNUNET_SCHEDULER_NO_TASK for none).
*/
GNUNET_SCHEDULER_TaskIdentifier my_receive;
GNUNET_SCHEDULER_add_select (server->sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_MAX (server->listen_socket,
server->shutpipe[0]) + 1, &r, NULL,
GNUNET_SCHEDULER_add_select (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_MAX (ret->listen_socket,
ret->shutpipe[0]) + 1, &r,
struct NotifyList *n;
unsigned int rc;
- GNUNET_assert (client->my_receive == GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (client->my_receive == GNUNET_SCHEDULER_NO_TASK);
rc = client->reference_count;
if (client->server != NULL)
{
const char *cbuf = buf;
size_t maxcpy;
- client->my_receive = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ client->my_receive = GNUNET_SCHEDULER_NO_TASK;
if ((buf == NULL) ||
(available == 0) ||
(errCode != 0) ||
{
if (client->server == NULL)
return; /* already disconnected */
- GNUNET_assert (client->my_receive != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK);
+ GNUNET_assert (client->my_receive != GNUNET_SCHEDULER_NO_TASK);
client->receive_cancel (client->client_closure, client->my_receive);
- client->my_receive = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ client->my_receive = GNUNET_SCHEDULER_NO_TASK;
shutdown_incoming_processing (client);
}
GNUNET_SCHEDULER_add_read (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
ls, &run_accept, cls);
}
GNUNET_SCHEDULER_add_read (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
ls, &run_accept, cls);
}
GNUNET_SCHEDULER_add_read (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
ls, &run_accept_cancel, cls);
GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_SECONDS,
&receive_cancel_task, cls);
}
GNUNET_SCHEDULER_add_read (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
fds[0], &taskRd, cls);
GNUNET_SCHEDULER_add_write (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_UNIT_FOREVER_REL,
fds[1], &taskWrt, cls);
}
t2 = GNUNET_SCHEDULER_add_after (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_IDLE,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
&task2, cls);
/* t3 will go before t4: higher priority */
t4 = GNUNET_SCHEDULER_add_after (tc->sched,
GNUNET_SCHEDULER_add_delayed (tc->sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MILLISECONDS, i),
&test_task, NULL);
struct SignalTimeoutContext *stctx;
GNUNET_SCHEDULER_TaskIdentifier ret;
- ret = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
+ ret = GNUNET_SCHEDULER_NO_TASK;
switch (*ok)
{
case 1:
ret = GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
timeout, &signal_timeout, stctx);
break;
default:
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MILLISECONDS, 50),
&send_done, argclient);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MILLISECONDS, 50),
&server_disconnect, argclient);
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_YES,
GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+ GNUNET_SCHEDULER_NO_TASK,
GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MILLISECONDS, 50),
&send_done, argclient);