[PATCH v2 04/12] kern_tc.c: Add definition of atomic_load_int() required by PPS API

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 3 07:01:59 UTC 2022



On 29/04/2022 09:20, Gabriel Moyano wrote:
> ---
>   cpukit/include/sys/timepps.h | 4 ++++
>   cpukit/score/src/kern_tc.c   | 7 +++++++
>   2 files changed, 11 insertions(+)
> 
> diff --git a/cpukit/include/sys/timepps.h b/cpukit/include/sys/timepps.h
> index 621afb08ec..5703381ffa 100644
> --- a/cpukit/include/sys/timepps.h
> +++ b/cpukit/include/sys/timepps.h
> @@ -32,7 +32,11 @@
>   
>   typedef int pps_handle_t;	
>   
> +#ifndef __rtems__
>   typedef unsigned pps_seq_t;
> +#else /* __rtems__ */
> +typedef Atomic_Uint	pps_seq_t;
> +#endif /* __rtems__ */
>   
>   typedef struct ntp_fp {
>   	unsigned int	integral;
> diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
> index e57da2c0ca..f7d0a0b4ba 100644
> --- a/cpukit/score/src/kern_tc.c
> +++ b/cpukit/score/src/kern_tc.c
> @@ -114,6 +114,13 @@ atomic_thread_fence_rel(void)
>   	_Atomic_Fence(ATOMIC_ORDER_RELEASE);
>   }
>   
> +static inline u_int
> +atomic_load_int(Atomic_Uint *i)
> +{
> +
> +	return (_Atomic_Load_uint(i, ATOMIC_ORDER_RELAXED));
> +}
> +
>   static inline u_int
>   atomic_load_acq_int(Atomic_Uint *i)
>   {

Please merge this and the previous commit.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list