Changeset: 53f302fac1b2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/53f302fac1b2
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk_interprocess.c
gdk/gdk_interprocess.h
Branch: default
Log Message:
No need to export function GDKmmapfile.
diffs (63 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -304,7 +304,6 @@ size_t GDKmallocated(const void *s);
size_t GDKmem_cursize(void);
gdk_return GDKmergeidx(BAT *b, BAT **a, int n_ar);
void *GDKmmap(const char *path, int mode, size_t len)
__attribute__((__warn_unused_result__));
-gdk_return GDKmmapfile(char *buffer, size_t max, size_t id);
int GDKms(void);
gdk_return GDKmunmap(void *addr, size_t len);
int GDKnr_threads;
diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c
--- a/gdk/gdk_interprocess.c
+++ b/gdk/gdk_interprocess.c
@@ -50,6 +50,17 @@ GDKuniqueid(size_t offset)
return (size_t) ATOMIC_ADD(&interprocess_unique_id, (ATOMIC_BASE_TYPE)
offset);
}
+//! snprintf the file name of a memory mapped file (as created by GDKinitmmap)
+/* buffer: The buffer to write the name to
+ * max: The maxsize of the buffer (should be at least ~10 characters)
+ * id: Identifier of the file
+*/
+static inline void
+GDKmmapfile(char *buffer, size_t max, size_t id)
+{
+ snprintf(buffer, max, "pymmap%zu", id);
+}
+
//! Create a memory mapped file if it does not exist and open it
/* id: The unique identifier of the memory mapped file (use GDKuniqueid to get
a unique identifier)
* size: Minimum required size of the file
@@ -126,18 +137,6 @@ GDKreleasemmap(void *ptr, size_t size, s
return ret < 0 ? GDK_FAIL : GDK_SUCCEED;
}
-//! snprintf the file name of a memory mapped file (as created by GDKinitmmap)
-/* buffer: The buffer to write the name to
- * max: The maxsize of the buffer (should be at least ~10 characters)
- * id: Identifier of the file
-*/
-gdk_return
-GDKmmapfile(char *buffer, size_t max, size_t id)
-{
- snprintf(buffer, max, "pymmap%zu", id);
- return GDK_SUCCEED;
-}
-
static gdk_return
interprocess_init_semaphore(int id, int count, int flags, int *semid)
{
diff --git a/gdk/gdk_interprocess.h b/gdk/gdk_interprocess.h
--- a/gdk/gdk_interprocess.h
+++ b/gdk/gdk_interprocess.h
@@ -30,8 +30,6 @@ gdk_export size_t GDKuniqueid(size_t off
gdk_export void *GDKinitmmap(size_t id, size_t size, size_t *return_size);
//! Release a memory mapped file that was created through GDKinitmmap
gdk_export gdk_return GDKreleasemmap(void *ptr, size_t size, size_t id);
-//! snprintf the file name of a memory mapped file (as created by GDKinitmmap)
-gdk_export gdk_return GDKmmapfile(char *buffer, size_t max, size_t id);
/*
* Interprocess-Semaphores, used for cross process lock operations
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]