lkml.org 
[lkml]   [2006]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Must check what?
Vadim Lobanov wrote:
> On Wednesday 04 October 2006 12:43, Andrew Morton wrote:
>
>> I like assertions personally. If we had something like:
>>
>> void foo(args)
>> {
>> locals;
>>
>> assert_irqs_enabled();
>> assert_spin_locked(some_lock);
>> assert_in_atomic();
>> assert_mutex_locked(some_mutex);
>>
>> then we get documentation which is (optionally) checked at runtime - best
>> of both worlds. Better than doing it in kernel-doc. Automatically
>> self-updating (otherwise kernels go BUG).
>>
>
> Uhoh! How much is that going to hurt runtime? :) It actually seems to me like
> this should be doable by static code analysis tools without terribly much
> pain (in the relative sense of the term). Or am I wrong on this thought?
>
Surely, any debugging that hurts will only really be there
if you enable CONFIG_DEBUG_something

The kind of stuff you ask people to turn on when they report
strange crashes.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-05 15:27    [W:0.058 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site