summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-12-15 03:16:24 +0000
committerAndrew Tridgell <tridge@samba.org>1998-12-15 03:16:24 +0000
commit5377f7ab3b05a2d56d73f6721c4db5cd41d859dc (patch)
treee9ff74491331786bf7542be85dad949d19ad0c24
parente67a8d9d984dbdef307294358d7d9a7f4314ea09 (diff)
downloadsamba-5377f7ab3b05a2d56d73f6721c4db5cd41d859dc.tar.gz
samba-5377f7ab3b05a2d56d73f6721c4db5cd41d859dc.tar.bz2
samba-5377f7ab3b05a2d56d73f6721c4db5cd41d859dc.zip
on Linux force fcntl/mmap based shared memory and on other systems
force IPC/shmem based shared memory. (This used to be commit ef5f752a4ae818d9c739a064410a02fa48a477e3)
-rw-r--r--source3/include/includes.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 58c6ee01bd..824a5bde5d 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -46,6 +46,19 @@
#endif
+/* if we have both SYSV IPC and shared mmap then we need to choose. For most
+ systems it is much faster to use SYSV IPC, but under Linux it is
+ about 5 times faster to use fcntl, so for Linux systems we force
+ fcntl based locking */
+#if (defined(HAVE_SYSV_IPC) && defined(HAVE_SHARED_MMAP))
+# ifdef LINUX
+# undef HAVE_SYSV_IPC
+# else
+# undef HAVE_SHARED_MMAP
+# endif
+#endif
+
+
#include <sys/types.h>
#ifdef TIME_WITH_SYS_TIME