This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stop application execution from kernel


Hi Nodir

Nodir Kodirov wrote:

> I am trying to make *schedulability analysis* for my application,
> where user will enter *wcet* and *period* of each thread at thread
> creation time and I will check schedulability based on these two
> values. I am doing this in kernel domain and after checking, I am
> *prompting* user about *non-feasible schedule* (if threads' CPU usage
> is greater than 100%). Now, I am fully able to prompt user about
> *non-schedulability* and stop application execution from kernel with
> this code:
> 
>> cyg_bool fail = false;
>> CYG_TRACE1(1, "Non-feasible scheduling", true);
>> fail = true;
>> CYG_ASSERT( !fail, "Correct thread's wcet please, it is failed");
> 
> But, when I disable *Infrastructure->Asserts & Tracing* in ConfigTool
> it doesn't work (because my code is based on Asserts & Tracing). So,
> my question, is it possible to do this without *Asserts&Tracing*? I
> mean to disable *Asserts&Tracing* and being able to stop application
> execution after prompting user in command line.

The configurable tracing and assertion macros are provided to allow
diagnostics messages to be eliminated for release builds where there is
no accessible diagnostic channel. This is generally a good thing.

You can call diag_printf() directly in order to emit a diagnostic
message unconditionally and you can use "for(;;);" to halt the
application. But would it not be better to educate users of your
scheduler to enable asserts and tracing during development?

John Dallaway
eCos maintainer

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]