aboutsummaryrefslogtreecommitdiff
path: root/src/core/msgqueue.c
Commit message (Collapse)AuthorAge
* fixes #132 Implement saner notification for file descriptorsGarrett D'Amore2017-10-24
| | | | | | | | | This eliminates the "quasi-functional" notify API altogether. The aio framework will be coming soon to replace it. As a bonus, apps (legacy apps) that use the notification FDs will see improved performance, since we don't have to context switch to give them a notification.
* fixes #112 Need to move some stuff from socket to message queuesGarrett D'Amore2017-10-23
|
* Allocate AIOs dynamically.Garrett D'Amore2017-09-22
| | | | | | | | | | | | | | We allocate AIO structures dynamically, so that we can use them abstractly in more places without inlining them. This will be used for the ZeroTier transport to allow us to create operations consisting of just the AIO. Furthermore, we provide accessors for some of the aio members, in the hopes that we will be able to wrap these for "safe" version of the AIO capability to export to applications, and to protocol and transport implementors. While here we cleaned up the protocol details to use consistently shorter names (no nni_ prefix for static symbols needed), and we also fixed a bug in the surveyor code.
* Provide versions of mutex, condvar, and aio init that never fail.Garrett D'Amore2017-08-16
| | | | | | | | | | | | | | | | | | | | | | | If the underlying platform fails (FreeBSD is the only one I'm aware of that does this!), we use a global lock or condition variable instead. This means that our lock initializers never ever fail. Probably we could eliminate most of this for Linux and Darwin, since on those platforms, mutex and condvar initialization reasonably never fails. Initial benchmarks show little difference either way -- so we can revisit (optimize) later. This removes a lot of otherwise untested code in error cases and so forth, improving coverage and resilience in the face of allocation failures. Platforms other than POSIX should follow a similar pattern if they need this. (VxWorks, I'm thinking of you.) Most sane platforms won't have an issue here, since normally these initializations do not need to allocate memory. (Reportedly, even FreeBSD has plans to "fix" this in libthr2.) While here, some bugs were fixed in initialization & teardown. The fallback code is properly tested with dedicated test cases.
* Fix a few problems found by codacy. One was a real bug.Garrett D'Amore2017-08-14
|
* Fence post error in queue drain, close or fini.Garrett D'Amore2017-08-11
|
* Remove some dead code; msg queue depths are always unsigned.Garrett D'Amore2017-08-07
|
* Refactor AIO logic to close numerous races and reduce complexity.Garrett D'Amore2017-08-04
| | | | | | | | | This passes valgrind 100% clean for both helgrind and deep leak checks. This represents a complete rethink of how the AIOs work, and much simpler synchronization; the provider API is a bit simpler to boot, as a number of failure modes have been simply eliminated. While here a few other minor bugs were squashed.
* Fix EAGAIN (timeout thread can run before we finish scheduling!)Garrett D'Amore2017-07-16
|
* AIO timeouts work correctly now, using their own timer logic.Garrett D'Amore2017-07-16
| | | | | | | | We closed a few subtle races in the AIO subsystem as well, and now we were able to eliminate the separate timer handling the MQ code. There appear to be some opportunities to further enhance the code for MQs as well -- eventually probably the only access to MQs will be with AIOs.
* Give up on uncrustify; switch to clang-format.Garrett D'Amore2017-07-10
|
* SRWLocks FTW!Garrett D'Amore2017-07-07
| | | | | | | | | Modern Windows (Vista and later) have light weight Slim Read/Write locks which only occupy 64 bits, and don't require any memory allocation to create. While here clean up a few more unreferenced variables found with the Microsoft compilers.
* Improved routines for list management.Garrett D'Amore2017-07-04
|
* Remove the unused infinite timeout versions of msgq.Garrett D'Amore2017-07-03
|
* Use common aio cancellation.Garrett D'Amore2017-07-02
|
* Refactor stop again, closing numerous races (thanks valgrind!)Garrett D'Amore2017-06-28
|
* Cancellation plumbing for message queues.Garrett D'Amore2017-06-27
|
* Put errors go on the putq.Garrett D'Amore2017-06-27
|
* Notification working - separate thread now.Garrett D'Amore2017-03-11
|
* Removing some dead code.Garrett D'Amore2017-03-11
|
* Surveyor pattern callback-driven.Garrett D'Amore2017-03-10
|
* Start of close related race fixes. Scalability test.Garrett D'Amore2017-03-10
|
* Pub/Sub now callback driven.Garrett D'Amore2017-03-06
|
* Pair protocol now callback driven.Garrett D'Amore2017-03-06
|
* Bus protocol now callback-driven.Garrett D'Amore2017-03-05
|
* Pipeline protocol now entirely callback driven.Garrett D'Amore2017-03-04
|
* Timer implementation. Operations can timeout now?Garrett D'Amore2017-03-03
|
* Start of msgq aio.Garrett D'Amore2017-03-01
|
* We don't need putback on message queues after all.Garrett D'Amore2017-02-18
|
* Event notification via pollable FDs verified working.Garrett D'Amore2017-01-22
|
* Fix synchronization problem in msgqueue with multiple consumers.Garrett D'Amore2017-01-19
|
* fixes #12 SURVEY hang in TravisGarrett D'Amore2017-01-18
|
* Recv/Send event plumbing implemented (msgqueue and up).Garrett D'Amore2017-01-16
| | | | | | | | This change provides for a private callback in the message queues, which can be used to notify the socket, and which than arranges for the appropriate event thread to run. Upper layer hooks to access this still need to be written.
* Initialize some mq vars.Garrett D'Amore2017-01-09
|
* Add survey test (and fix survey pattern).Garrett D'Amore2017-01-09
| | | | | | | As part of this, we've added a way to unblock callers in a message queue with an error, even without a signal channel. This was necessary to interrupt blockers upon survey timeout. They will get NNG_ETIMEDOUT, but afterwards callers get NNG_ESTATE.
* Change a bunch of copyrights to 2017 for work done since the 1st.Garrett D'Amore2017-01-05
|
* PUB protocol (untested).Garrett D'Amore2017-01-05
|
* Change msgqueue -> msgq.Garrett D'Amore2017-01-02
|
* Use new NNI_ALLOC_STRUCT macro. nni_msg_dup copies options too.Garrett D'Amore2017-01-02
|
* Message queues use new locking primitives.Garrett D'Amore2017-01-01
|
* Implement msgqueue_putback.Garrett D'Amore2016-12-28
| | | | | | | This function is called when we wish to return a message to the queue after examining it. It can also be used by the resender in the REQ protocol. Critically it does not disrupt the ordering of other messages. This is a non-blocking operation.
* Send and receive now work.Garrett D'Amore2016-12-27
| | | | | | This fixes a few core issues, and improves readability for the message queue code as well. inproc delivery of messages works now.
* Buffer resizing implemented. (Needed for single threaded inproc tests.)Garrett D'Amore2016-12-27
|
* Uncrustify fixes.Garrett D'Amore2016-12-23
|
* Don't linger if there are no possible readers present.Garrett D'Amore2016-12-23
|
* Support for unbuffered msgqueues (like Go unbuffered channels.)Garrett D'Amore2016-12-23
|
* Endpoint dialer implemented.Garrett D'Amore2016-12-22
|
* Work on endpoints. More C99 & type cleanups.Garrett D'Amore2016-12-22
|
* Inline locks (fewer allocs), simpler absolute times for wakeups. nn_sock_recv.Garrett D'Amore2016-12-22
|
* Synchronization enhancements - inproc & msgqueue. Absolute waits...Garrett D'Amore2016-12-22
|