Age | Commit message (Collapse) | Author |
|
On NetBSD IPC backlog test hangs. This patch disables it to
keep CI running.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Implements the SP wire protocol, and infrastructure for legacy wire
protocol support.
Also added an XS_SERVICE_ID socket option to set the service id and renamed
the XS_PROTOCOL option to XS_PATTERN_VERSION.
The following pattern versions are supported:
PAIR: v3
PUBSUB: v1 (legacy), v4
REQREP: v2
PIPELINE: v3
SURVEY: v2
Note that all existing pattern versions have been bumped by 1 to allow for
use of legacy protocols (otherwise there would be no way to distinguish
between e.g. PUBSUB v3 and PUBSUB v3 using SP).
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668550)
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Up to now, when survey in surveyor pattern expired, xs_recv()
returned EAGAIN. That made it impossible to distinguish
epired survey from expired receive timeout (XS_RCVTIMEO).
This patch make errors different in both cases.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
|
|
So far, the event used for signaler creation was local to the session,
so, in theory, processes in two different sessions could accidentally
interconnect their signalers.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
If plugin directory doesn't exist, is a file or
user has no permissions to access it, the plugins
are not loaded.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The test now tests whether second connection to a single
PAIR socket won't crash the process.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
When more then one peer connected to a PAIR socket,
an application aborted due to assertion failure.
This patch changes the PAIR socket behaviour so that
it rejects any further connection requests.
|
|
The package (tarball, zip) was missing these MSVC projects which
means libzmq and tests could not be built from the package, only
from git. This patch fixes the problem.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch explains the backward incompatible change in 1.1.0.
It is a post-hoc patch which will not appear in 1.1.0 tarballs.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
- version bump
- ABI version bump
- NEWS updated
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Previously the code used for loading plug-ins would be built only on
Linux hosts. Now the required functions are checked for and plug-in
loading code is enabled if those are present on all platforms. Using
lstat() to check for file types also increases portability to hosts that
do not have the dirent.d_type field. If shared libraries support is
disabled plug-ins will also be automatically disabled.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Accidentally, one of the sockets in Windows signaler_t
was opened usign WSASocket instead of xs::open_socket.
That skipped the standard XS socket initialisation
and caused the socket to be inheritable to the child
processes.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The decoder did not properly decode large messages
on systems where sizeof (size_t) < sizeof (uint64_t).
|
|
When HWM was set to small value it may have happened that command
indicating that pipe is ready for writing wasn't processed
because of command throttling.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
When processing commands with throttling switched off, RDTSC
instruction was executed, but the result was never used. This
patch eliminates the unneeded instruction.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch fixes a bug in the message encoder which was
responsible for computing incorrect message offset.
The bug affected PGM receiver making it unable to
decode inital messages.
|
|
On Windows and OpenVMS there is no IPC transport. This patch fixes the
problem introduced by previous patches, where the fact is not taken
into account.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
|
|
This prevents the long-standing issue of an invalid pgm or epgm connection
string from causing an assert when the connection is attempted and fails.
|
|
The function was erroneously declared as xs_init()
instead of xs_init(void).
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch reintroduces the behaviour that if a tcp:// or ipc:// connection
string which is invalid is passed to xs_connect, then an error is reported,
instead of asserting at connection time
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
EAGAIN was being used as a translation value for EINPROGRESS, thus
shadowing a real EAGAIN return value from the OS. This caused later
assertions of "Invalid argument" in stream_engine.cpp when it attempted to
use a socket which was not connected.
I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD
documentation which specifies that a connect() call interrupted due to a
signal will complete asynchronously.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Feature checks are introduced to check for all the headers required by
the select() and poll() calls. Include files are then included
conditionally without the use of any OS-specific directive. The change
also fixes a couple of problems:
- Fixed compilation under FreeBSD, NetBSD and OpenBSD when forcing the
use of select() in the poller
- Quieted a warning mixed-sign comparison warning on FreeBSD caused by
FD_SETSIZE being declared as an unsigned constant on that OS
- Removed the obsolescent AC_HEADER_TIME macro from the configure script
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
This reverts commit 512f3a604924fec9d89e2b4bfd6f73aa66309fa7.
|
|
The commands was a vestige of the removed 'durable sockets' feature
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Paul Colomiets <paul@colomiets.name>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Implements SP protocol versioning, legacy protocol support, and the
following pattern protocol versions:
PAIR: v2
PUBSUB: v1 (legacy), v3
REQREP: v1
PIPELINE: v2
SURVEY: v1
Engine support is only for stream_engine_t at this stage.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
When socket in the process of asynchronous connect is being closed
and the fact that there is no peer is found out at the same time
close() may return ECONNRESET. This patch handles this situation
decently.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
As per Patrick Trantham comment
http://groups.crossroads.io/r/topic/510xaadGgWVcXFdATnhAuN
the GCC __sync_*() builtins are more generic but slower than specialized
hand-written assembly for armv7a case.
Therefore, the code is reordered for prefer inline assembly for armv7a
over GCC builtins.
* src/atomic_counter.hpp:
(atomic_counter_t::add):
(atomic_counter_t::sub):
* src/atomic_ptr.hpp:
(atomic_ptr_t::xchg):
(atomic_ptr_t::cas):
Prefer armv7a specific inline asm over GCC __sync_*() builtins.
|
|
* configure.ac:
Check for working Solaris/NetBSD-style atomic.h independly on OS.
Add check for GCC-style __sync_*() builtins.
New defines: XS_ATOMIC_GCC_SYNC, XS_ATOMIC_SOLARIS.
Removed define: XS_FORCE_MUTEXES.
* src/atomic_counter.hpp:
(atomic_counter_t::add):
(atomic_counter_t::sub):
* src/atomic_ptr.hpp:
(atomic_ptr_t::xchg):
(atomic_ptr_t::cas):
Use result of these checks.
Preference order:
1. GCC-style __sync_*() builtins
2. Inline asm (x86, x86-64, armv7a)
3. Solaris/NetBSD-style atomic.h, Windows-specific API
4. Fallback to mutex-based implementation
|
|
Use GCC __sync_*() builtins when compiler claims to be GCC (GCC itself,
Clang...)
It can be disabled explicitly by using XS_DISABLE_GCC_SYNC_BUILTINS
define. Just for any case.
* src/atomic_counter.hpp [__GNUC__ && !XS_DISABLE_GCC_SYNC_BUILTINS]:
(atomic_counter_t::add):
(atomic_counter_t::sub):
* src/atomic_ptr.hpp [__GNUC__ && !XS_DISABLE_GCC_SYNC_BUILTINS]:
(atomic_ptr_t::xchg):
(atomic_ptr_t::cas):
Prefer GCC __sync_*() builtins over inline asm.
|
|
This commit implements atomic operations for the armv7a architecture
using gcc inline assembly. This offers higher performance compared to
pthread mutexes.
Tested on an am3517 evm, clocked at 600MHz:
./inproc_thr 200 1000000
------------------------
53-60K messages / sec, pthread mutexes
73-90K messages / sec, assembly atomic ops
./inproc_lat 200 1000000
------------------------
average latency: 42.234 [us], pthread mutexes
average latency: 35.496 [us], assembly atomic ops
|
|
|
|
This patch cleans up a number of obsolete constructs in the build
system, these include:
- Replacing AC_TRY_RUN with AC_RUN_IFELSE for the SOCK_CLOEXEC test
- Using AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER
- Using LT_INIT with the win32-dll parameter instead of the obsolete
AC_PROG_LIBTOOL and AC_LIBTOOL_WIN32_DLL macros
- Removing the unused and obsolete AC_TYPE_SIGNAL check
- Removing the unused alloca.h header check
- Replacing the deprecated INCLUDES macro with AM_CPPFLAGS
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|