Angus Salkeld
6f73dd2993
LOG: make all priorities uint8_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:54:13 +10:00
Angus Salkeld
ea2d5d4058
Add qbconfig.h to the list of headers to be installed.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 22:23:01 +10:00
Angus Salkeld
b7e83fd3b2
LOG: add dynamic callsites (for platforms that don't support __attribute__(section)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:38 +10:00
Angus Salkeld
4de5ff927f
ARRAY: add getter's to retrieve number of bins and elms/bin
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 09:55:57 +10:00
Angus Salkeld
568befd3f1
LOG: add LOG_TRACE
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-12 22:21:57 +10:00
Angus Salkeld
78541f5198
LOG: add the ability to adjust the priority sent to syslog()
...
If you have:
qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
QB_LOG_FILTER_FILE, "hack.c", LOG_DEBUG);
these logs will not make there way to /var/log/messags
without reconfiguring syslog.
So to help on the fly debugging do the following:
qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_PRIORITY_BUMP,
LOG_INFO - LOG_DEBUG);
Now all messages that have the QB_LOG_SYSLOG target set
will have their priority bumped before going to syslog().
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-12 22:20:50 +10:00
Angus Salkeld
58697dbcc6
LOG: change the target type from uint32_t to int32_t.
...
This is so that you won't get warnings from mixing integer types.
I have updated the input checks in log.c to check for invalid
targets.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-09 23:11:44 +10:00
Angus Salkeld
249546a9e7
LOG: teach filter_ctl() to write tags
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-06 22:27:53 +10:00
Angus Salkeld
b5d27ad250
LOG: remove the tags arument from qb_log() and add qb_logt() which has the tags argument.
...
I think in most cases tags will not be used and it will
just be a pain inserting ", 0". But if someone wants to use
tags like this then they still can via qb_logt()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-06 22:27:41 +10:00
Angus Salkeld
9aa50b2ece
LOG: fix shared library callsites
...
This finds all the callsites in shared libraries
(using dl_iterate_phdr()) at the time qb_log_init()
is called.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Conflicts:
lib/log.c
2011-04-06 22:09:46 +10:00
Angus Salkeld
9b18614473
LOG: add a callsite_dump() function to see what callsite are avaliable.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-06 22:06:01 +10:00
Angus Salkeld
aefae42937
LOG: support dynamically loaded modules
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-06 21:41:13 +10:00
Angus Salkeld
51a1153ecb
Add required include to qbloop.h
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-04 11:09:16 +10:00
Angus Salkeld
b81d75fab5
LOG: make the documentation more meaningful
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-01 22:42:43 +11:00
Angus Salkeld
7f0d983f49
LOG: add a qb_log_fini() to cleanup
...
This replaces qb_log_thread_stop() but also release shared mem
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-01 14:50:51 +11:00
Angus Salkeld
e390613036
LOG: fix mapping from priority to name
...
Remove qb_log_priority_name_get() as we have the
formatting.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:38:08 +11:00
Angus Salkeld
191b71a8b7
LOG: add a new "tags" field
...
this is a tags that is used by the caller to:
- define the message as an external message (needs free'ing)
- define a feature or susbsytem that can be printed in the log message.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:37:44 +11:00
Angus Salkeld
9d159ab87f
LOG: change "tags" field to "targets"
...
This is it's new meaning, so makes things clearer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:33:37 +11:00
Angus Salkeld
34ee74db55
LOG: add a format option to each target.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 23:06:41 +11:00
Angus Salkeld
764fd0284b
LOG: improve the docs
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 21:33:07 +11:00
Angus Salkeld
da28f16dd8
LOG: add qb_log_file_close()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 21:22:27 +11:00
Angus Salkeld
2836e5bcf9
LOG: add the ability to import logs from other sources.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 21:17:50 +11:00
Angus Salkeld
1a9c549eb5
Be more consistent with the C++ protection
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 19:53:41 +11:00
Angus Salkeld
32817adb15
LOG: re-work the API to be easier to use.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 11:46:36 +11:00
Angus Salkeld
dd4d21472c
LOG: add qb_log_priority_name_get()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-28 12:25:26 +11:00
Angus Salkeld
04b76a0f27
LOG: fix make install and distcheck
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-28 12:25:06 +11:00
Angus Salkeld
3452d162d2
LOG: add a qb_perror() function
...
- Add an internal version too
- Update the library code to use it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-28 11:12:47 +11:00
Angus Salkeld
2956f9ef29
LOG: add a timestamp to the log handler
...
This makes sure that the timestamp is correct at the time
the call to qb_log() was called.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 22:57:58 +11:00
Angus Salkeld
6eddcfc26e
LOG: split the tag function out into tag and untag
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 22:03:33 +11:00
Angus Salkeld
fcf4ddfd59
LOG: improve the doxygen overview.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 21:56:59 +11:00
Angus Salkeld
a215e856d8
LOG: fix splint warnings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 21:01:11 +11:00
Angus Salkeld
f86c96bee1
LOG: add a blackbox
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:40:53 +11:00
Angus Salkeld
5bddb0fe68
LOG: add threaded logging (non-blocking)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:35:35 +11:00
Angus Salkeld
e910f8bc18
Add logging infrastructure.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:34:12 +11:00
Angus Salkeld
3c742eb761
DOCS: add missing @param on new timeout argument
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-09 17:23:45 +11:00
Angus Salkeld
8431910be0
LOOP: change timer handle from pointer to index + check.
...
This changes the timer hande from a live pointer to a handle
more like hdb handles (minus the ref counting).
What i like about this is it is not neccessary to clear
the applications handle using memset().
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-05 10:52:30 +11:00
Angus Salkeld
324580f5c2
LOOP: remove tlist absolute timer
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-05 09:21:15 +11:00
Angus Salkeld
fa892f679c
RB: add a function to get the reference count.
...
Really handy to see if the peer is "connected".
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 22:09:52 +11:00
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
45ff679934
LOOP: change timers to be nano second based
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-13 12:23:45 +11:00
Angus Salkeld
fa72adc5be
DOCS: fix some doxygen warnings for missing comments.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-13 10:43:35 +11:00
Angus Salkeld
47cedda894
IPC: export qb_ipcs_disconnect()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-03 11:19:09 +11:00
Angus Salkeld
f7f6c89591
TLIST: use qb_util_nano_monotonic_hz() instead of HZ
...
also add a test for under running.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-12 15:15:31 +11:00
Angus Salkeld
e7d2dd9646
LOOP: add signal support to main loop
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-09 11:51:22 +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
0207003da5
RB: don't be so timid on shutdown
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-02 23:19:26 +11:00
Angus Salkeld
920a927116
Cleanup config defines & add a check_all script
...
Run:
./check_all
to build with and without some common configurations.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-01 22:05:46 +11:00
Angus Salkeld
fbf4a50141
UTIL: move mmap helpers into private header
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-01 10:39:18 +11:00
Angus Salkeld
970a4bc6d5
LOOP: add qb_loop_destroy()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-30 20:51:36 +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
d4ad56b8b7
TIME: move tlist_nano_ functions into util
...
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
cf12f09b31
fix some build issues on FreeBSD
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-22 14:49:54 +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
875a4f8d53
ATOMIC: fix the memory barrier setup.
...
This was horribly broken.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-20 11:31:44 +11:00
Angus Salkeld
9d8d6bfdce
LINT: get the lint target working.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 22:36:08 +11:00
Angus Salkeld
f780aaea2d
HDB: remove locks and use atomic.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 10:24:04 +11:00
Angus Salkeld
84488fdb85
HDB: use qb_array.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 09:54:12 +11:00
Angus Salkeld
f0efc457db
DOCS: add some doxygen comments to array & hdb.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 08:59:51 +11:00
Angus Salkeld
9745d4feb7
Add a resizable array that doesn't move memory.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 07:05:54 +11:00
Angus Salkeld
e7b46822d5
ATOMIC: fix make distcheck
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 07:05:54 +11:00
Angus Salkeld
ec61d212d5
LIST/LOOP: allow empty list items but don't splice an empty head.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 07:05:54 +11:00
Angus Salkeld
43d8b36518
Add atomic operations.
...
This was initially copied from glib. How ever I have
simplified it to only support proper atomic operations
with gcc builtin __sync calls. The backup is pthread_spin_lock().
I have also obviously namespaced the code to qb_.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-18 11:24:07 +11:00
Angus Salkeld
47443a5b63
DOCS: do some work on the doxygen output.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-17 19:31:24 +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
ab3cc42537
LIST: fix logic in qb_list_splice()
...
this fixes "make check"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-16 21:42:50 +11:00
Steven Dake
9e5385b885
qb_list_splice: don't splice an empty list
...
An empty list passed to splice will damage the target splice list. This patch
prevents that from happening by checking for an empty list and not merging
in that case.
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-15 07:36:35 +11:00
Angus Salkeld
e9d10dfdbe
IPC: remove flow control API and move functionality into send()
...
There is no point in a separate API.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-14 09:16:00 +11:00
Angus Salkeld
0d9f8720b9
IPC: add qb_ipcc_sendv_recv() convenience function.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-13 10:01:30 +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
8d3ec80c19
RB: add support for shared user data.
...
(I need this for flow control)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:53 +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
1f6c42b098
IPC: make msg_process return type int
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
57af215a96
Remove timer.c (rather use mainloop)
...
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
3dcd1126f6
IPC: remove qb_ipcc_event_release()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:46:53 +11:00
Angus Salkeld
9fdecded41
LIST: add some more convenience macros.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:46:39 +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
9c0fa42f17
UTIL: add qb_timespec_add_ms()
...
add X milli seconds to a timespec.
add time defines to qbdefs.h
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
68938d3c9e
LIST: add required header
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10:00
Angus Salkeld
ac6ed91a7d
POLL: gracefully handle running out of file descriptors.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10:00
Angus Salkeld
e3a6cd6ad6
Delete unchecked API (to be re-added later).
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-30 20:49:11 +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
f2c80cb086
RB: add qb_rb_chown()
...
change the ownership of the two mmap'ed files.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-30 20:07:35 +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
64b4aac413
IPC: un-const the data pointer in recv()
...
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
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
Angus Salkeld
a6285e6f14
RB: add function qb_rb_chunks_used()
...
This is to make it easier to to see if there is
a chunk available to be read.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-09 16:59:26 +10:00
Angus Salkeld
f04f1abcf0
POLL: add a job API to process non-fd items.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-07-28 21:12:11 +10:00
Angus Salkeld
41c06ef6e6
int -> int32_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-22 11:55:09 +10:00
Angus Salkeld
60b11eee49
unsigned int -> uint32_t
...
some to int32_t (bugs)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-22 11:54:58 +10:00
Angus Salkeld
cdb9d32de4
unsigned long long -> uint64_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-22 11:28:56 +10:00
Angus Salkeld
2432ca85b9
list: rename QB_DECLARE_LIST_INIT -> QB_LIST_DECLARE
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-16 13:24:14 +10:00
Angus Salkeld
b8a5a74fcc
hdb: move functions into cfile
...
convert int -> int32_t
rename qb_hdb_handle_t -> qb_handle_t
rename DECLARE_HDB_DATABASE -> QB_HDB_DECLARE
rename qb_hdb_handle_database -> qb_hdb
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-16 09:12:20 +10:00
Angus Salkeld
87f204469a
ipc: convert int -> int32_t; unsigned int -> uint32_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-15 14:46:52 +10:00
Angus Salkeld
ec9a050a29
rb: make rb_chunk_peek() wait on the sem like chunk_read()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-15 12:56:23 +10:00
Angus Salkeld
35e062e275
rb: fix bit flag numbering
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-15 12:56:23 +10:00
Angus Salkeld
e7975a77e3
rb: add a get name function
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-12 11:25:50 +10:00
Angus Salkeld
2787bea55c
list: add some more doxygen comments
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-12 10:47:41 +10:00
Angus Salkeld
3f2c3b9906
rb: add an example to the doxygen description.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-12 10:47:10 +10:00
Angus Salkeld
d9f93c15e5
rb: rename qb_rb_chunk_writable* -> qb_rb_chunk_
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-12 09:10:49 +10:00
Angus Salkeld
595bd54502
util: move some handy macros into qbuil.h
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-11 20:13:42 +10:00
Angus Salkeld
e6d5f32f9f
Bring some changes across from corosync.
...
My coverity fixes and honzas fixes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-11 09:51:53 +10:00
Angus Salkeld
7a90cdda1f
Remove unneccessary extern's.
...
http://gcc.gnu.org/ml/gcc/2009-04/msg00812.html
http://publications.gbdirect.co.uk/c_book/chapter4/linkage.html
http://www.eskimo.com/~scs/cclass/notes/sx5b.html
note in ipcs.c qb_ipcs_ipc_init() is extern'ed, I don't
think that this is needed - we'll soon see :)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-11 08:29:31 +10:00
Angus Salkeld
0a23eb2be1
Format all files with Lindent
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-10 21:42:08 +10:00
Angus Salkeld
bd2c07f739
Add a ringbuffer based off the one in logsys.
...
This ringbuffer is usable across processes.
the point is to use this for IPC to provide async
connections from client to server, but with inherient
flow control.
This still needs a bit of clean up, but committing now
for feedback and as it is quite functional.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-10 12:44:27 +10:00
Angus Salkeld
6b052988a9
man: document qblist.h better.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-31 15:22:12 +10:00
Angus Salkeld
8ff8c7bfba
Add __cplusplus externs
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 21:53:40 +10:00
Angus Salkeld
29cee5ec5e
use new interanl logging functions
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 15:53:44 +10:00
Angus Salkeld
396fb4f375
Add a library logging function.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 15:07:54 +10:00
Angus Salkeld
5f7d3749c9
Add a util library with locking wrappers.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 15:06:41 +10:00
Angus Salkeld
caecbe6542
Re-license to LGPL 2.1
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 06:11:59 +10:00
Angus Salkeld
f0834863c6
fix "make distcheck"
...
I am sure that I am going to learn one day :(
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 21:24:21 +10:00
Angus Salkeld
74a7a49354
ipc: add a non-blocking send function.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 14:47:42 +10:00
Angus Salkeld
3eb313a848
ipc: add common types to qbipc_common.h
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 11:23:35 +10:00
Angus Salkeld
e9467c988c
ipc: remove uneccessary version compatibilty
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 11:22:45 +10:00
Angus Salkeld
c6134b367c
add a unit test for hash & cleanup.
...
Fix make distcheck
Add qbhash.h to the makefiles
Fix make rpm.
Make sure the makefiles are generatd for hash
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-15 12:19:08 +10:00
Steven Dake
82e984fe38
Add an initial implementation of a hash table.
...
The hash table implementation is somewhat unique in that I plan to add graph
functionality to allow hash entries to be linked between other hash
entries to provide a mechanism to structure data within a hash table.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-15 08:00:56 +10:00
Angus Salkeld
b64457e19e
add logsys from corosync.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-20 21:40:03 +11:00
Angus Salkeld
2bea1f4f65
Add wthread & queue.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-20 21:23:19 +11:00
Angus Salkeld
428003888a
add ipcs from corosync
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 15:04:21 +11:00
Angus Salkeld
ceff27f370
Add ipcc from corosync
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 14:42:25 +11:00
Angus Salkeld
c7e93f2f5c
add the plugin library.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 14:36:04 +11:00
Angus Salkeld
b503a98acf
Added qb_ prefix onto public functions/types.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 14:28:22 +11:00
Angus Salkeld
1aee5e128b
Add timer.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 14:25:35 +11:00
Angus Salkeld
81facf8267
Add poll, list & tlist
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-11 15:54:03 +11:00
Angus Salkeld
50bcb27284
Add handle database.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-11 14:52:57 +11:00
Angus Salkeld
69d77500df
Initial Commit.
...
-autotools build system
-tsafe
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-11 14:19:39 +11:00