[PATCH v1] move isr_level of SMP_lock_Context into ISR_lock_Context
朱忠杰
zhongjiezhu1 at gmail.com
Tue Jan 17 02:29:37 UTC 2023
On Mon, Jan 16, 2023 at 2:47 PM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 16.01.23 07:33, Zhu Zhongjie wrote:
> > From: Zhongjie Zhu<zhongjiezhu1 at gmail.com>
> >
> > when Acquires an ISR lock in SMP system, it first call _ISR_Local_disable()
> > to disable ISR, this is the same with in UP system, so we could
> > use the same isr_level in ISR_lock_Context, this change will also save 4 Bytes
> > of SMP_lock_Context.
>
> I don't think we should change the existing implementation which
> separates the uniprocessor and SMP-specific parts. This patch mixes
> things together.
>
> It is not necessary to save four bytes in SMP_lock_Context since this
> structure is almost always allocated on the stack.
>
Sorry, I misunderstand the ISR_lock and _ISR_Local_disable
I just thought those two smp related functions
_SMP_lock_ISR_disable_and_acquire() and the
_SMP_lock_Release_and_ISR_enable()
mixed the ISR_lock information with SMP_lock
I have read the history commits of isr_lock and smp_lock.
> --
> 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