Angus Salkeld
c566421df9
rb: cleanup the semaphores
...
- the way they are selected
- rpl_sem.c the error handling
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 10:39:43 +10:00
Angus Salkeld
8ed5f55990
Cleanup the .gitignore files
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:43:58 +10:00
Angus Salkeld
916440d08d
Remove HZ and use sysconf instead.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:38:38 +10:00
Angus Salkeld
259021414a
SUN_LEN() macro is present if __EXTENSIONS__ is defined on Illumos
...
A bit reworked but originally from Igor Pashev:
84c47f8160
Note: __EXTENSIONS__ also defines _GNU_SOURCE, so removing it as well.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 21:37:04 +10:00
Igor Pashev
9b3822dd2a
PF_UNIX is a POSIX standard name
2012-05-09 18:56:25 +10:00
Igor Pashev
62e070a720
Test for log facility names
2012-05-09 18:56:08 +10:00
Angus Salkeld
b6945e5eb6
IPC: drop log message to debug.
...
this can be noisy when there are a lot of transient
connections.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-09 11:45:51 +10:00
Angus Salkeld
7c2e632be0
IPC: fix retrying of partial recv's and sends.
...
Move to send() instead of sendmsg() as it's easier
to track resending partial messages.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-03 21:24:02 +10:00
Angus Salkeld
c2651bb9bf
IPC: initialize enough shared mem for all 3 one way connections.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-03 08:20:59 +10:00
Angus Salkeld
494293a97b
IPC: keep retrying to recv the socket message if partially recv'ed (part 2)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:39:03 +10:00
Angus Salkeld
f2916c7576
IPC: keep retrying to recv the socket message if partially recv'ed
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:03:23 +10:00
Angus Salkeld
72938081c0
IPC: handle the server shutdown better
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 16:00:05 +10:00
Angus Salkeld
9f09aba8dd
IPC: handle a connection disconnect from the server better
...
Only problem with SOCKET.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 10:15:19 +10:00
Angus Salkeld
78fb4ad682
IPC: make it possible to send events in the connected callback.
...
This was only a problem with QB_IPC_SOCKET.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 20:09:21 +10:00
Angus Salkeld
6b7da3f531
Add the event queue length to the connection stats.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 13:22:16 +10:00
Angus Salkeld
b29326a363
IPC: add a is_connected client side function.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:43:22 +10:00
Angus Salkeld
4550cc9e45
Remove unused local variable
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 09:13:04 +10:00
Angus Salkeld
9e3c2ea33d
IPC: change the socket recv function to read the response header.
...
It needs to only recv the size of this message, else we recv more
than one message and effectively drop messages (hidden at the end
of the current message).
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Angus Salkeld
3f4a175312
IPC: make it possible for a root client to talk to a non-root server.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 08:25:57 +10:00
Angus Salkeld
fbd05ba1d2
IPC: make sure ipc (socket) clients can connect to a server running as root.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:35:38 +10:00
Angus Salkeld
0e140bbf0f
IPC: allow qb to bump the max_message_size
...
I think this is more user friendly.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 20:42:45 +10:00
Angus Salkeld
72033f2b4f
IPC: check for a sane minimum max_message_size
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 19:57:26 +10:00
Angus Salkeld
316fd95e00
add rpl_sem.h loop_poll_int.h to noinst_headers
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 19:10:43 +10:00
Angus Salkeld
239ddc067f
Handle errors more consistently
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
b650bf29d6
call recv_ready on socket types
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
d80f218133
Handle a recv of size 0
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
4b7581e514
make bsd shm path better by default.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 20:55:37 +10:00
Angus Salkeld
481b354794
Fix kqueue on freebsd.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 20:55:37 +10:00
Angus Salkeld
7a09cdae67
Fix kqueue compiling.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 01:37:00 +10:00
Angus Salkeld
26491555ef
POLL: seperate out the poll/epoll and add kqueue
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 00:26:20 +10:00
Jan Friesse
e2fe03e491
Don't link with setpshared if unavailable
...
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Jan Friesse
7b13d09afb
Use MADV_NOSYNC only on systems where available
...
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-28 09:28:42 +11:00
Jan Friesse
77787d49e5
Use SCHED_BATCH only on platforms where available
...
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-28 09:28:42 +11:00
Angus Salkeld
c97113bd83
Fix a bug introduced by the bsd patch.
...
I missed the non-native case.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-27 20:57:10 +11:00
Angus Salkeld
3d291540b1
Cleanup the selection of semaphores to use
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-27 20:57:06 +11:00
Angus Salkeld
d6883981e3
Fix some leaks in the logging.
...
Mainly for valgrind purposes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-27 16:42:38 +11:00
Angus Salkeld
1af214d91d
Try and improve the portability on bsd variants.
...
Also add a QB_IPC_NATIVE type that selects the best ipc type available.
Signed-off-by: Angus <angus@anguss-mac-mini>
2012-03-24 22:43:37 +11:00
The Quarterback Library Release Team
50f07abcfe
Bump the version to 0.11.1
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-03-11 22:17:43 +11:00
Angus Salkeld
4f5d55a48e
LOOP: remove some old timerfd code.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 20:20:04 +11:00
Angus Salkeld
082a04e288
LOOP: when new jobs are added they are added to the head instead of the tail.
...
We must add new jobs to the tail of the job queue otherwise
old jobs will get stuck in the job list.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 19:32:37 +11:00
Angus Salkeld
9294ebfa57
LOG: Now the array is self locking we can make the lookup array dynamic
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:34:50 +11:00
Angus Salkeld
4df255d919
Add locking to the array when growing.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:34:50 +11:00
Angus Salkeld
58bc8e6bb4
IPC: make the _request_q_len_get() function more obvious.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:34:50 +11:00
Angus Salkeld
bd39cd4d20
IPC: fix multiple receives from qb_ipc_us_recv()
...
So this function is used by the QB_IPC_SOCKET transport
and is used like recv(,, max_size_of_my_rx_buf,,);
But in the shared mem transport it is used to recv
a notification of something in shared mem is available
in this case we really want to make sure we recv all
the notifications. So I have split these into 2 functions.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:21:38 +11:00
Angus Salkeld
c2f5f94312
IPC: make sure that the wrong union member is not written to.
...
Move the connection type into the one_way struct. Seem
like a more obvious place for it next to the union.
Also it will help prevent issues like in qb_ipc_us_recv()
where there is a rather dodgy access of ctl->sent.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:18:02 +11:00
Angus Salkeld
6d0d8bb670
TIMER: check for null timer handle
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:17:03 +11:00
The Quarterback Library Release Team
418471e6c1
Bump the version to 0.11.0
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-03-07 21:11:40 +11:00
Angus Salkeld
a9cdbbef8e
ARRAY: cleanup the pointer sizeof()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 20:42:51 +11:00
Angus Salkeld
430c038d36
LOG: make the log arrays manually grow-able since we need to lock the calls.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 12:48:43 +11:00
Angus Salkeld
2ae58d2472
RB: fix test failure on ppc
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 11:37:12 +11:00