Hi,
My name is Domen Ipavec and I'm interested in applying for Raspberry Pi
Dashboard idea.

So as I was going through your Getting started guide, and when I tried to
compile with monkey with configuration option: ./configure --linux-trace, I
got the following error:
‘sched_signal_channel’ undeclared

So I looked through the source and found the line 160 in file
mk_scheduler.c:
MK_LT_SCHED(sched_signal_channel, "SYNC COUNTERS");
should be:
MK_LT_SCHED(sched->signal_channel, "SYNC COUNTERS");

When I tried to compile now, I got the following error:
‘sched’ is used uninitialized
So i figured MK_LT_SCHED should be used after sched is initialized on line
164.

Attached is the output of git diff.

So now I have 2 questions:
1. Is my correction correct?
2. How do I apply the change to your github repository?

Domen
diff --git a/src/mk_scheduler.c b/src/mk_scheduler.c
index a8e455a..585e2af 100644
--- a/src/mk_scheduler.c
+++ b/src/mk_scheduler.c
@@ -156,13 +156,12 @@ int mk_sched_sync_counters()
     struct mk_list *head;
     struct sched_list_node *sched;
 
-
-    MK_LT_SCHED(sched_signal_channel, "SYNC COUNTERS");
-
     /* we only aim to fix the value of closed_connections */
     pthread_mutex_lock(&mutex_sched_init);
     sched = mk_sched_get_thread_conf();
 
+    MK_LT_SCHED(sched->signal_channel, "SYNC COUNTERS");
+
     if (sched->closed_connections > sched->accepted_connections) {
         /* Count the real number of active connections */
         mk_list_foreach(head, &sched->busy_queue) {
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to