Angus Salkeld
43181d5a95
IPC: add a timeout to the client recv functions
...
Also allow the ringbuffer to pass ETIMEDOUT back to the
client applications.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 21:47:47 +11:00
Angus Salkeld
859006bb14
IPC: rename _ref_inc() to _ref()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-13 16:18:19 +11:00
Angus Salkeld
89192dbc72
Remove carriage returns in qb_util_log() calls.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-10 09:46:48 +11:00
Angus Salkeld
2e81d71182
IPC: check for null ringbuffer
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-10 09:46:48 +11:00
Angus Salkeld
0300f3c9a5
IPC: fix non-blocking event mechanism
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-10 09:46:48 +11:00
Angus Salkeld
5289646a7c
IPCS: don't block on sending socket notification
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-03 12:48:05 +11:00
Angus Salkeld
a292be30c5
IPC: remove try again log message
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-15 16:03:37 +11:00
Angus Salkeld
1a073f7b29
LOOP: prevent timers from deleting them selves.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-15 16:03:31 +11:00
Angus Salkeld
bc19fd32d8
IPC: withdraw server socket when destroying a service.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-12 22:13:43 +11:00
Angus Salkeld
c516965fbb
IPC: add connection_closed() callback.
...
- added another callback closed() and use this as the current
destroyed_connection() has been used.
- the destroyed() event changes meaning to
"the connection object is about to be free'ed"
and the user can free the context memory.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-04 10:16:58 +11:00
Angus Salkeld
b07b65df42
IPC: change service instance from handle to pointer.
...
Mainly to be consistent with the other objects.
Also:
- splint warnings(-weak) are now zero.
- Added a reference counter to replace the handle.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-03 21:41:05 +11:00
Angus Salkeld
b6ae0b5c10
IPC: remove refcount'ing debug
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-30 20:53:12 +11:00
Angus Salkeld
e390a373d5
IPC: add server connection states for better shutdown.
...
This also fixes the refcounting, which was not quite right.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:48:56 +11:00
Angus Salkeld
90beaae095
IPC: add qb_ipcs_response_sendv()
...
iovec friendly response function
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:36:13 +11:00
Angus Salkeld
36d1171e2a
IPC: add job_add() API to the poll abstraction.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:33:00 +11:00
Angus Salkeld
cdc953384f
Fix or ignore splint errors
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-22 14:50:04 +11:00
Angus Salkeld
2549e5c24a
IPC: add a connection iterator.
...
So we can iterate over all connections on a service.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-21 21:48:29 +11:00
Angus Salkeld
c5ed1450a1
IPC: add stats to server end.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-21 21:43:26 +11:00
Angus Salkeld
97cdc99743
IPC: use atomic for ref counting.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-18 11:25:32 +11:00
Angus Salkeld
31ca215188
IPC: add support for unix sockets
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-17 14:23:53 +11:00
Angus Salkeld
12b2d87bfa
IPC: add q_len_get() to posix_mq & sysv_mq
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-13 21:37:59 +11:00
Angus Salkeld
dffc9262ed
IPC: move destroy() into ipcs.c (all were duplicated)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-13 21:23:07 +11:00
Angus Salkeld
d4c287a5f4
IPC: recv the messages available (not just one)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:53 +11:00
Angus Salkeld
e1686dbd6a
IPC: add support for flowcontrol & rate limiting
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:53 +11:00
Angus Salkeld
1a13b65de1
IPC: cleanup some formatting.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
99a8264550
IPC: improve send/recv error handling
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
33045932c5
IPC: accelerate process when rate_limit == FAST.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
8df21458f5
IPC: get the poll independent functions working.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
95ac972b57
IPC: add peek & reclaim
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
08e5a9004d
Add a priority based main loop.
...
This is to try and get a better balance in the amount
of processing between IPC and totem in corosync.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
82c13bdd2b
IPC: make events always use socket notification
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
e0f942bfee
IPC: teach event_recv() to take a timeout
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
f1f301724b
IPC: improve resource cleanup/shutdown
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
b95ed274bc
IPC: make internal message ids negative.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
dc618488d2
IPC: add a user context_get/set() functions.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
c1a3b0d029
IPC: add sendv() functions to handle iovecs.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
a7bf0518a7
add qbdefs.h with some common defines.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-04 10:04:01 +11:00
Angus Salkeld
69f2c88081
IPC: add a service_id and merge qb_ipcs_create() + qb_ipcs_service_handlers_set()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-02 21:06:12 +10:00
Angus Salkeld
fcd0ca69d9
IPC: change the ipcs_connection to a pointer (not handle).
...
This is make integrating with corosync easier.
Also technically it doesn't really matter it still
has a reference counter.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10:00
Angus Salkeld
2aae94eb1d
IPC: make authenticate callback more generic "accept".
...
This is so that it is more obvious that you can use
it for authentication, service availabilty and
process resource constraints.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10:00
Angus Salkeld
86c84f6ae0
IPC: new auth improvement and limits work around.
...
Create the queues/ringbuffers on the server so we don't
have to modify proc entries. Then chown them so that
the clients can access them.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-30 20:17:59 +10:00
Angus Salkeld
b6d4fb95b8
IPC: add events back (were dispatch messages in corosync)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-29 14:32:51 +10:00
Angus Salkeld
b29a1809f4
IPC: rename qb_ipcs_connection_pt -> qb_ipcs_connection_handle_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-29 14:32:51 +10:00
Angus Salkeld
b28173ee81
IPC: get shm & pmq working
...
Note: pmq needs "sudo make check"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-07 14:11:42 +10:00
Angus Salkeld
eae6c35157
IPC: linux & bsd mq_open returns a poll'able file descriptor.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-06 16:50:19 +10:00
Angus Salkeld
1b84f99ef7
Lindent most c files again.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-06 16:50:05 +10:00
Angus Salkeld
e558ca0d39
IPC: fix crash on failed auth
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-06 16:49:35 +10:00
Angus Salkeld
d27e50c58a
Define new return status policy
...
Good >= 0 (0 = good, or positive value)
Bad < 0 (-errno)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-06 16:49:15 +10:00
Angus Salkeld
8a6b8d78db
IPC: rewrite (simpler API & more structured layout).
...
- implement using posix message queues
- implement using sys-v message queues
- implement shared memory ringbuffers
- add auth via unix sockets
- add items to the TODO
This is still a bit rough, more work to follow...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-23 12:46:36 +10:00
Angus Salkeld
5221880227
automake: check for more headers
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-22 22:06:59 +10:00