Angus Salkeld
943b1c646b
fix the FIXME's Jim pointed out
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 11:11:14 +10:00
Jim Meyering
9c467cb150
add FIXME comments for other NULL-deref-upon-OOM problems
...
* lib/ipc_us.c (handle_new_connection):
* lib/loop_job.c (qb_loop_jobs_create):
* lib/loop_poll.c (qb_loop_poll_create):
* lib/loop_timerlist.c (qb_loop_timer_create):
* lib/ringbuffer.c (qb_rb_open):
* lib/ipcc.c (qb_ipcc_connect): Likewise.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-17 21:32:29 +10:00
Angus Salkeld
45fa3b045d
TESTS: use new logging API
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:46 +10: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
6b96fdcbf1
LOOP: check read() return value
...
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
8d96ea05bc
LOOP: make static functions like _<name>_()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-22 09:12:56 +11:00
Angus Salkeld
8c28e4558a
LOOP: reduce the number of for loops
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-22 09:12:56 +11:00
Angus Salkeld
bba1f150d1
LOOP: change entry type enum
...
This to avoid QB_POLL been equal to 0, which could
hide some bugs.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-22 09:12:17 +11:00
Angus Salkeld
6c6486204b
LOOP: add per-level todo counters
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-22 09:12:04 +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
a80fde39ef
LOOP: remove unneccessary event array
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-10 09:46:47 +11:00
Angus Salkeld
d8a433b0b3
LOOP: fix compile warning when we don't have timerfd.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-16 20:58:49 +11:00
Angus Salkeld
668eb0a2d5
LOOP: move pipe creation into qb_loop_signals_create()
...
Also make sure the pipe is non blocking.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-16 14:38:34 +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
f7a28f1be2
LOOP: add some debug to log slow jobs
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-12 22:39:59 +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
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
dc08661297
LOOP: add support for timerfd
...
If available use timerfd_create() as it is
much more accurate than tlist.h
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-01 10:14:08 +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
cdc953384f
Fix or ignore splint errors
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-22 14:50:04 +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
835422a25e
LOOP: use qbarray for poll_entries.
...
This fixes an issue where removing or adding entries
can cause a realloc() to move the entries and then a
qb_list_del() causes a SIGSEGV (next pointer is now
invalid).
qbarray does not use realloc() so does not suffer from this.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 07:05:54 +11:00
Angus Salkeld
c297a6b6a9
fix some valgrind warnings
...
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
487eb57dd2
LOOP: add epoll support
...
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