aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-08-30 20:54:44 +0000
committerFlorian Dold <florian.dold@gmail.com>2015-08-30 20:54:44 +0000
commit2e25d8c868521f318381a8b87c9f8c1c7c402b7c (patch)
treea5d9b8fca78e55da9d8c62ff8fe6d1d480a459e0 /src/set/gnunet-service-set.h
parentc92948f72526fe599680c06cbe80d0ffdc11f597 (diff)
downloadgnunet-2e25d8c868521f318381a8b87c9f8c1c7c402b7c.tar.gz
gnunet-2e25d8c868521f318381a8b87c9f8c1c7c402b7c.zip
add test case for 'GNUNET_SET_copy_lazy', fix bugs
Diffstat (limited to 'src/set/gnunet-service-set.h')
-rw-r--r--src/set/gnunet-service-set.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/set/gnunet-service-set.h b/src/set/gnunet-service-set.h
index d23291c82..fb079d03f 100644
--- a/src/set/gnunet-service-set.h
+++ b/src/set/gnunet-service-set.h
@@ -437,6 +437,25 @@ struct SetContent
437 struct GNUNET_CONTAINER_MultiHashMap *elements; 437 struct GNUNET_CONTAINER_MultiHashMap *elements;
438 438
439 unsigned int latest_generation; 439 unsigned int latest_generation;
440
441 /**
442 * Mutations requested by the client that we're
443 * unable to execute right now because we're iterating
444 * over the underlying hash map of elements.
445 */
446 struct PendingMutation *pending_mutations_head;
447
448 /**
449 * Mutations requested by the client that we're
450 * unable to execute right now because we're iterating
451 * over the underlying hash map of elements.
452 */
453 struct PendingMutation *pending_mutations_tail;
454
455 /**
456 * Number of concurrently active iterators.
457 */
458 int iterator_count;
440}; 459};
441 460
442 461
@@ -454,6 +473,22 @@ struct GenerationRange
454}; 473};
455 474
456 475
476struct PendingMutation
477{
478 struct PendingMutation *prev;
479 struct PendingMutation *next;
480
481 struct Set *set;
482
483 /**
484 * Message that describes the desired mutation.
485 * May only be a GNUNET_MESSAGE_TYPE_SET_ADD or
486 * GNUNET_MESSAGE_TYPE_SET_REMOVE.
487 */
488 struct GNUNET_MessageHeader *mutation_message;
489};
490
491
457/** 492/**
458 * A set that supports a specific operation with other peers. 493 * A set that supports a specific operation with other peers.
459 */ 494 */
@@ -540,7 +575,6 @@ struct Set
540 * and thus reference counted. 575 * and thus reference counted.
541 */ 576 */
542 struct SetContent *content; 577 struct SetContent *content;
543
544}; 578};
545 579
546 580