Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
lib/ipc_sysv_mq.c | 5 +----
lib/ipc_us.c | 2 --
lib/loop.c | 2 --
lib/loop_job.c | 8 ++++++--
lib/ringbuffer.c | 12 +++++++++---
tests/bms.c | 3 +--
tests/loop.c | 4 +++-
tests/rbwriter.c | 1 -
8 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/lib/ipc_sysv_mq.c b/lib/ipc_sysv_mq.c
index f5ef463..583d15d 100644
--- a/lib/ipc_sysv_mq.c
+++ b/lib/ipc_sysv_mq.c
@@ -227,10 +227,7 @@ static void qb_ipcc_smq_disconnect(struct qb_ipcc_connection *c)
{
struct qb_ipc_request_header hdr;
- qb_util_log(LOG_DEBUG, "%s()", __func__);
- //if (c->needs_sock_for_poll) {
- // return;
- //}
+ qb_util_log(LOG_TRACE, "%s()", __func__);
hdr.id = QB_IPC_MSG_DISCONNECT;
hdr.size = sizeof(hdr);
diff --git a/lib/ipc_us.c b/lib/ipc_us.c
index 45c2d2c..47a1ed2 100644
--- a/lib/ipc_us.c
+++ b/lib/ipc_us.c
@@ -867,9 +867,7 @@ static void qb_ipcs_us_disconnect(struct qb_ipcs_connection *c)
munmap(c->request.u.us.shared_data, sizeof(struct ipc_us_control));
unlink(c->request.u.us.shared_file_name);
-// close(c->setup.u.us.sock);
close(c->request.u.us.sock);
-// close(c->response.u.us.sock);
close(c->event.u.us.sock);
}
diff --git a/lib/loop.c b/lib/loop.c
index 538d8a7..5cf594b 100644
--- a/lib/loop.c
+++ b/lib/loop.c
@@ -87,7 +87,6 @@ struct qb_loop * qb_loop_create(void)
}
l->stop_requested = QB_FALSE;
- // install sources
l->timer_source = qb_loop_timer_create(l);
l->job_source = qb_loop_jobs_create(l);
l->fd_source = qb_loop_poll_create(l);
@@ -141,7 +140,6 @@ void qb_loop_run(struct qb_loop *l)
}
}
todo += l->fd_source->poll(l->fd_source, ms_timeout);
-// qb_poll_print(l);
for (p = QB_LOOP_HIGH; p >= p_stop; p--) {
todo -= qb_loop_run_level(&l->level[p]);
diff --git a/lib/loop_job.c b/lib/loop_job.c
index 84cba0a..3ed783f 100644
--- a/lib/loop_job.c
+++ b/lib/loop_job.c
@@ -38,7 +38,9 @@ static void job_dispatch(struct qb_loop_item * item,
job->dispatch_fn(job->item.user_data);
free(job);
- // this is a one-shot so don't re-add
+ /*
+ * this is a one-shot so don't re-add
+ */
}
static int32_t get_more_jobs(struct qb_loop_source* s, int32_t ms_timeout)
@@ -46,7 +48,9 @@ static int32_t get_more_jobs(struct qb_loop_source* s, int32_t
ms_timeout)
int32_t p;
int32_t new_jobs = 0;
- // this is simple, move jobs from wait_head to job_head
+ /*
+ * this is simple, move jobs from wait_head to job_head
+ */
for (p = QB_LOOP_LOW; p <= QB_LOOP_HIGH; p++) {
if (!qb_list_empty(&s->l->level[p].wait_head)) {
new_jobs += qb_list_length(&s->l->level[p].wait_head);
diff --git a/lib/ringbuffer.c b/lib/ringbuffer.c
index 7004369..493713f 100644
--- a/lib/ringbuffer.c
+++ b/lib/ringbuffer.c
@@ -22,7 +22,9 @@
#include <qb/qbdefs.h>
#include <qb/qbatomic.h>
-//#define CRAZY_DEBUG_PRINTFS 1
+/*
+ * #define CRAZY_DEBUG_PRINTFS 1
+ */
#ifdef CRAZY_DEBUG_PRINTFS
#define DEBUG_PRINTF(format, args...) \
do { \
@@ -58,7 +60,9 @@ do { \
* move the write pointer to the next 32 byte boundry
* write_pt goes in 4 bytes (sizeof(uint32_t))
*/
-//#define USE_CACHE_LINE_ALIGNMENT 1
+/*
+ * #define USE_CACHE_LINE_ALIGNMENT 1
+ */
#ifdef USE_CACHE_LINE_ALIGNMENT
#define idx_cache_line_step(idx) \
do { \
@@ -252,7 +256,9 @@ ssize_t qb_rb_space_free(qb_ringbuffer_t * rb)
size_t space_free = 0;
write_size = rb->shared_hdr->write_pt;
- // TODO idx_cache_line_step (write_size);
+ /*
+ * TODO idx_cache_line_step (write_size);
+ */
read_size = rb->shared_hdr->read_pt;
if (write_size > read_size) {
diff --git a/tests/bms.c b/tests/bms.c
index c8a6c3b..cade87b 100644
--- a/tests/bms.c
+++ b/tests/bms.c
@@ -221,7 +221,6 @@ static int32_t my_g_dispatch_add(enum qb_loop_priority p, int32_t fd,
int32_t ev
static int32_t my_g_dispatch_mod(enum qb_loop_priority p, int32_t fd, int32_t evts,
void *data, qb_ipcs_dispatch_fn_t fn)
{
- //return qb_loop_poll_mod(bms_loop, p, fd, evts, data, fn);
return 0;
}
@@ -280,7 +279,7 @@ int32_t main(int32_t argc, char *argv[])
};
#ifdef HAVE_GLIB
struct qb_ipcs_poll_handlers glib_ph = {
- .job_add = NULL, // FIXME
+ .job_add = NULL, /* FIXME */
.dispatch_add = my_g_dispatch_add,
.dispatch_mod = my_g_dispatch_mod,
.dispatch_del = my_g_dispatch_del,
diff --git a/tests/loop.c b/tests/loop.c
index 6585599..2a203fc 100644
--- a/tests/loop.c
+++ b/tests/loop.c
@@ -108,7 +108,9 @@ int main(int argc, char * argv[])
qb_loop_job_add(l, QB_LOOP_LOW, NULL, job_2_4);
qb_loop_job_add(l, QB_LOOP_HIGH, NULL, job_1_2);
qb_loop_job_add(l, QB_LOOP_MED, NULL, job_3_7);
-// qb_loop_timer_add(l, QB_LOOP_HIGH, 40*QB_TIME_NS_IN_MSEC, NULL, more_jobs, &th);
+/*
+ * qb_loop_timer_add(l, QB_LOOP_HIGH, 40*QB_TIME_NS_IN_MSEC, NULL, more_jobs, &th);
+ */
qb_loop_job_add(l, QB_LOOP_MED, NULL, job_2_8);
qb_loop_job_add(l, QB_LOOP_LOW, NULL, job_3_6);
diff --git a/tests/rbwriter.c b/tests/rbwriter.c
index ec70187..8985d0d 100644
--- a/tests/rbwriter.c
+++ b/tests/rbwriter.c
@@ -110,7 +110,6 @@ static void bmc_send_nozc(size_t size)
repeat_send:
res = qb_rb_chunk_write(rb, buffer, size);
if (res < size) {
- //usleep(1);
goto repeat_send;
}
}
--
1.7.5.1