[LITMUS^RT] CreateAPluginTutorial - Step4 : error when compiling
Björn Brandenburg
bbb at mpi-sws.org
Tue May 7 14:19:47 CEST 2013
On May 7, 2013, at 2:14 PM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
> On May 7, 2013, at 2:11 PM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
>>
>> On May 7, 2013, at 9:29 AM, Schorr Stefan <stschorr at eit.uni-kl.de> wrote:
>>>
>>> I'm trying to follow the Create A Plugin Tutorial from the webpage.
>>> The first steps work like a charm, step 4 however doesn't compile :(
>>>
>>> I copied the code from the website and I created a new local git
>>> branch, so I'm absolutely sure that the only file I changed - apart
>>> from the Makefile - is sched_demo.c (so I don't understand why
>>> the error messages below point to .h files).
>>>
>>> Please give me some hint what goes wrong here...
>>>
>>> Best Regards
>>> Stefan
>>>
>>>
>>> Here's the error I get, when doing make bzImage
>>>
>>> In file included from litmus/sched_demo.c:3:
>>> include/litmus/litmus.h:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘litmus_clock’
>>> include/litmus/litmus.h: In function ‘is_kernel_np’:
>>> include/litmus/litmus.h:120: error: dereferencing pointer to incomplete type
>>
>>
>> Hi Stefan,
>>
>> this is a configuration error in LITMUS^RT. Please enable the configuration option CONFIG_NP_SECTION, which should silence the error. Sorry about that...
>
>
> Actually, litmus/litmus.h already has correct dummy implementations for the !CONFIG_NP_SECTION case, so it's something different. Have you tried a 'make clean'?
>
If it doesn't go away, you are probably missing a header file. Here are the one from the reference version. Does it fail with these headers as well?
Thanks,
Björn
commit c5248a7288e54c2b5e2bba8aa2677772542bf90e
Author: Bjoern Brandenburg <bbb at mpi-sws.org>
Date: Mon Aug 13 16:33:36 2012 +0200
Add CPU-local state for the demo scheduler
The per-cpu state is initialized when the plugin is loaded.
diff --git a/litmus/sched_demo.c b/litmus/sched_demo.c
index f4f2207..5786391 100644
--- a/litmus/sched_demo.c
+++ b/litmus/sched_demo.c
@@ -1,9 +1,25 @@
-
+#include <linux/percpu.h>
#include <litmus/sched_plugin.h>
#include <litmus/preempt.h>
#include <litmus/debug_trace.h>
+#include <litmus/litmus.h>
+#include <litmus/rt_domain.h>
+#include <litmus/edf_common.h>
More information about the litmus-dev
mailing list