xenomai-git-requ...@gna.org wrote:
> diff --git a/include/asm-generic/bits/current.h 
> b/include/asm-generic/bits/current.h
> index f0e569c..b9ac680 100644
> --- a/include/asm-generic/bits/current.h
> +++ b/include/asm-generic/bits/current.h

...

> @@ -33,25 +33,16 @@ static inline xnhandle_t xeno_get_current(void)
>  {
>       void *val = pthread_getspecific(xeno_current_key);
>  
> -     if (!val)
> -             return XN_NO_HANDLE;
> -
> -     return (xnhandle_t)val;
> +     return (xnhandle_t)val ?: xeno_slow_get_current();
>  }

So when used with normal Linux threads, this will always trigger the
syscall of xeno_slow_get_current()?

> diff --git a/src/rtdk/assert_context.c b/src/rtdk/assert_context.c
> index bad19f3..f67bcd8 100644
> --- a/src/rtdk/assert_context.c
> +++ b/src/rtdk/assert_context.c
> @@ -30,12 +30,9 @@ void assert_nrt(void)
>       xnthread_info_t info;
>       int err;
>  
> -     if (xeno_get_current() != XN_NO_HANDLE)
> -             return;
> +     if (unlikely(xeno_get_current() != XN_NO_HANDLE &&
> +                  !(xeno_get_current_mode() & XNRELAX))) {

Then please provide a different API for assert_nrt as this makes the
service too heavy for common use.

The current_mode slow path is no problem as it only triggers during cleanup.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to