Changeset: d546f9e9cfc1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d546f9e9cfc1 Added Files: gdk/interprocess.c gdk/interprocess.h Removed Files: gdk/shared_memory.c gdk/shared_memory.h Modified Files: monetdb5/extras/pyapi/connection.c monetdb5/extras/pyapi/pyapi.c Branch: pythonudf Log Message:
Renamed shared_memory to interprocess because shared memory is not being used anymore. diffs (93 lines): diff --git a/gdk/shared_memory.c b/gdk/interprocess.c rename from gdk/shared_memory.c rename to gdk/interprocess.c --- a/gdk/shared_memory.c +++ b/gdk/interprocess.c @@ -1,5 +1,5 @@ -#include "shared_memory.h" +#include "interprocess.h" #ifdef HAVE_FORK @@ -59,19 +59,19 @@ str init_mmap_memory(size_t base_id, siz size = GDK_mmap_pagesize; */ fd = GDKfdlocate(0, address, "wb", "tmp"); if (fd < 0) { - return createException(MAL, "shared_memory.get", "Failure in GDKfdlocate(0, %s, \"wb\", NULL)", address); + return createException(MAL, "interprocess.get", "Failure in GDKfdlocate(0, %s, \"wb\", NULL)", address); } path = GDKfilepath(0, BATDIR, address, "tmp"); if (path == NULL) { - return createException(MAL, "shared_memory.get", "Failure in GDKfilepath(0, "BATDIR",%s,\"tmp\")", address); + return createException(MAL, "interprocess.get", "Failure in GDKfilepath(0, "BATDIR",%s,\"tmp\")", address); } close(fd); if (GDKextend(path, size) != GDK_SUCCEED) { - return createException(MAL, "shared_memory.get", "Failure in GDKextend(%s,%zu)", path, size); + return createException(MAL, "interprocess.get", "Failure in GDKextend(%s,%zu)", path, size); } ptr = GDKmmap(path, mod, size); if (ptr == NULL) { - return createException(MAL, "shared_memory.get", "Failure in GDKmmap(%s, %d, %zu)", path, mod, size); + return createException(MAL, "interprocess.get", "Failure in GDKmmap(%s, %d, %zu)", path, mod, size); } GDKfree(path); if (return_ptr != NULL) (*return_ptr)[id_offset] = ptr; @@ -86,17 +86,17 @@ str release_mmap_memory(void *ptr, size_ int ret; snprintf_mmap_file(address, 100, id); if (GDKmunmap(ptr, size) != GDK_SUCCEED) { - return createException(MAL, "shared_memory.get", "Failure in GDKmunmap(%p, %zu)", ptr, size); + return createException(MAL, "interprocess.get", "Failure in GDKmunmap(%p, %zu)", ptr, size); } path = GDKfilepath(0, BATDIR, address, "tmp"); if (path == NULL) { - return createException(MAL, "shared_memory.get", "Failure in GDKfilepath(0, "BATDIR",%s,\"tmp\")", address); + return createException(MAL, "interprocess.get", "Failure in GDKfilepath(0, "BATDIR",%s,\"tmp\")", address); } ret = remove(path); GDKfree(path); if (ret < 0) { perror(strerror(errno)); - return createException(MAL, "shared_memory.get", "Failure in remove(%s)", path); + return createException(MAL, "interprocess.get", "Failure in remove(%s)", path); } return MAL_SUCCEED; } diff --git a/gdk/shared_memory.h b/gdk/interprocess.h rename from gdk/shared_memory.h rename to gdk/interprocess.h diff --git a/monetdb5/extras/pyapi/connection.c b/monetdb5/extras/pyapi/connection.c --- a/monetdb5/extras/pyapi/connection.c +++ b/monetdb5/extras/pyapi/connection.c @@ -1,7 +1,7 @@ #include "connection.h" #include "type_conversion.h" -#include "shared_memory.h" +#include "interprocess.h" #if PY_MAJOR_VERSION >= 3 #define IS_PY3K diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c --- a/monetdb5/extras/pyapi/pyapi.c +++ b/monetdb5/extras/pyapi/pyapi.c @@ -11,7 +11,7 @@ #include "unicode.h" #include "pytypes.h" -#include "shared_memory.h" +#include "interprocess.h" #include "type_conversion.h" #include "formatinput.h" @@ -431,7 +431,7 @@ str ConvertToSQLType(Client cntxt, BAT * //! [CONVERT_BAT] Step 2: It converts the input BATs into Numpy Arrays //! [EXECUTE_CODE] Step 3: It executes the Python code using the Numpy arrays as arguments //! [RETURN_VALUES] Step 4: It collects the return values and converts them back into BATs -//! If 'mapped' is set to True, it will fork a separate process at [FORK_PROCESS] that executes Step 1-3, the process will then write the return values into Shared memory [SHARED_MEMORY] and exit, then Step 4 is executed by the main process +//! If 'mapped' is set to True, it will fork a separate process at [FORK_PROCESS] that executes Step 1-3, the process will then write the return values into memory mapped files and exit, then Step 4 is executed by the main process str PyAPIeval(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, bit grouped, bit mapped) { sql_func * sqlfun = *(sql_func**) getArgReference(stk, pci, pci->retc); str exprStr = *getArgReference_str(stk, pci, pci->retc + 1); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list