summary refs log tree commit diff
path: root/support/blob_repeat.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-05-12 19:01:49 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-05-12 19:02:44 +0200
commit0e28cfff9dfdb71352151054e0d38816856182d5 (patch)
tree38396de261b09ec133cc138a18f4b73217914ba2 /support/blob_repeat.h
parent4cab20fa49b3ea3e3454fdc4f13bf3828d8efd19 (diff)
downloadglibc-0e28cfff9dfdb71352151054e0d38816856182d5.tar.gz
glibc-0e28cfff9dfdb71352151054e0d38816856182d5.tar.xz
glibc-0e28cfff9dfdb71352151054e0d38816856182d5.zip
support: Add support_blob_repeat_allocate_shared
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'support/blob_repeat.h')
-rw-r--r--support/blob_repeat.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/support/blob_repeat.h b/support/blob_repeat.h
index 12f33bcd02..519458cf50 100644
--- a/support/blob_repeat.h
+++ b/support/blob_repeat.h
@@ -38,7 +38,17 @@ struct support_blob_repeat support_blob_repeat_allocate (const void *element,
                                                          size_t element_size,
                                                          size_t count);
 
-/* Deallocate the blob created by support_blob_repeat_allocate.  */
+/* Like support_blob_repeat_allocate, except that copy-on-write
+   semantics are disabled.  This means writing to one part of the blob
+   can affect other parts.  It is possible to map non-shared memory
+   over parts of the resulting blob using MAP_ANONYMOUS | MAP_FIXED
+   | MAP_PRIVATE, so that writes to these parts do not affect
+   others.  */
+struct support_blob_repeat support_blob_repeat_allocate_shared
+  (const void *element, size_t element_size, size_t count);
+
+/* Deallocate the blob created by support_blob_repeat_allocate or
+   support_blob_repeat_allocate_shared.  */
 void support_blob_repeat_free (struct support_blob_repeat *);
 
 #endif /* SUPPORT_BLOB_REPEAT_H */