MINOR: ssl: disable shared memory and locks on session cache if nbproc == 1
We don't needa to lock the memory when there is a single process. This can
make a difference on small systems where locking is much more expensive than
just a test.
diff --git a/include/proto/shctx.h b/include/proto/shctx.h
index 000cc05..862f6a0 100644
--- a/include/proto/shctx.h
+++ b/include/proto/shctx.h
@@ -56,9 +56,10 @@
/* Allocate shared memory context.
* size is maximum cached sessions.
* if set less or equal to 0, SHCTX_DEFAULT_SIZE is used.
+ * use_shared_memory is set to 1 to use a mapped share memory
* Returns: -1 on alloc failure, size if it performs context alloc,
* and 0 if cache is already allocated */
-int shared_context_init(int size);
+int shared_context_init(int size, int use_shared_memory);
/* Set shared cache callbacks on an ssl context.
* Set session cache mode to server and disable openssl internal cache.