All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: xenomai@xenomai.org
Subject: Re: [PATCH 13/13] cobalt/assert: pipeline: add TODO() marker
Date: Tue, 02 Feb 2021 17:17:47 +0100	[thread overview]
Message-ID: <87pn1itpec.fsf@xenomai.org> (raw)
In-Reply-To: <4740e1bd-00d3-3004-817d-c684c0f40752@siemens.com>


Jan Kiszka <jan.kiszka@siemens.com> writes:

> On 31.01.21 15:45, Philippe Gerum wrote:
>> From: Philippe Gerum <rpm@xenomai.org>
>> 
>> As its name suggests, TODO() can be added to the code in order to
>> highlight a place where some implementation bits are known to be
>> missing. Turning on CONFIG_XENO_TODO reveals the places where such
>> markers might linger by triggering a build time assertion, so that
>> they don't go unnoticed.
>> 
>> We may drop this helper when the port to Dovetail is complete.
>> 
>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>> ---
>>  include/cobalt/kernel/assert.h | 2 ++
>>  kernel/cobalt/Kconfig          | 6 ++++++
>>  2 files changed, 8 insertions(+)
>> 
>> diff --git a/include/cobalt/kernel/assert.h b/include/cobalt/kernel/assert.h
>> index 7d9433abc..8d004476b 100644
>> --- a/include/cobalt/kernel/assert.h
>> +++ b/include/cobalt/kernel/assert.h
>> @@ -58,6 +58,8 @@
>>  	do { } while (0)
>>  #endif
>>  
>> +#define TODO()    BUILD_BUG_ON(IS_ENABLED(CONFIG_XENO_TODO))
>> +
>>  #define primary_mode_only()	XENO_BUG_ON(CONTEXT, is_secondary_domain())
>>  #define secondary_mode_only()	XENO_BUG_ON(CONTEXT, !is_secondary_domain())
>>  #define interrupt_only()	XENO_BUG_ON(CONTEXT, !xnsched_interrupt_p())
>> diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
>> index ead4740c1..a266011d4 100644
>> --- a/kernel/cobalt/Kconfig
>> +++ b/kernel/cobalt/Kconfig
>> @@ -485,3 +485,9 @@ config XENO_OPT_WATCHDOG_TIMEOUT
>>  	  Watchdog timeout value (in seconds).
>>  
>>  endif # XENO_OPT_DEBUG
>> +
>> +config XENO_TODO
>> +	bool "Reveal TODO places"
>> +	help
>> +	  This option causes a build time assertion to trigger
>> +	  when the TODO() marker is found in the compiled code.
>> 
>
> No user at this stage. Do you think we will have any while finishing the
> port in-tree?
>

Many users follow, until the last patch of the remain stack is in (~70
commits), at which point a handful only should remain.

-- 
Philippe.


      reply	other threads:[~2021-02-02 16:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31 14:45 [PATCH 01/13] cobalt/kernel: pipeline: abstract context switching support Philippe Gerum
2021-01-31 14:45 ` [PATCH 02/13] cobalt/thread: pipeline: abstract synchronous single-stepping code Philippe Gerum
2021-01-31 14:45 ` [PATCH 03/13] cobalt/clock: pipeline: abstract access to host (real)time Philippe Gerum
2021-01-31 14:45 ` [PATCH 04/13] cobalt/arch: pipeline: move architecture code to pipeline-specific section Philippe Gerum
2021-02-03 10:18   ` Jan Kiszka
2021-01-31 14:45 ` [PATCH 05/13] cobalt/clock: pipeline: move TSC-related code to the I-pipe section Philippe Gerum
2021-01-31 14:45 ` [PATCH 06/13] cobalt/clock: drop timer calibration Philippe Gerum
2021-02-01 18:14   ` Jan Kiszka
2021-02-02 16:26     ` Philippe Gerum
2021-01-31 14:45 ` [PATCH 07/13] cobalt/arm: ipipe: remove obsolete calibration handler Philippe Gerum
2021-01-31 14:45 ` [PATCH 08/13] cobalt/arm64: " Philippe Gerum
2021-01-31 14:45 ` [PATCH 09/13] cobalt/x86: " Philippe Gerum
2021-01-31 14:45 ` [PATCH 10/13] cobalt/powerpc: " Philippe Gerum
2021-01-31 14:45 ` [PATCH 11/13] cobalt/machine: ipipe: drop timer frequency setting Philippe Gerum
2021-01-31 14:45 ` [PATCH 12/13] cobalt/init: ipipe: remove clock frequency override Philippe Gerum
2021-01-31 14:45 ` [PATCH 13/13] cobalt/assert: pipeline: add TODO() marker Philippe Gerum
2021-02-01 18:20   ` Jan Kiszka
2021-02-02 16:17     ` Philippe Gerum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn1itpec.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.