Skip to content

Initialize global mutext/sem by NXMUTEX_INITIALIZER and SEM_INITIALIZER#7472

Merged
masayuki2009 merged 10 commits into
apache:masterfrom
xiaoxiang781216:nxmutex4
Nov 14, 2022
Merged

Initialize global mutext/sem by NXMUTEX_INITIALIZER and SEM_INITIALIZER#7472
masayuki2009 merged 10 commits into
apache:masterfrom
xiaoxiang781216:nxmutex4

Conversation

@xiaoxiang781216

@xiaoxiang781216 xiaoxiang781216 commented Oct 29, 2022

Copy link
Copy Markdown
Contributor

Summary

Continue the work: #6965

Impact

Code refactor

Testing

Pass CI

@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 2 times, most recently from c5132e2 to e18a1f9 Compare October 29, 2022 13:13
@xiaoxiang781216 xiaoxiang781216 changed the title Initialize global mutext/sem by NXMUTEX_INITIALIZER and NXSEM_INITIALIZER Initialize global mutext/sem by NXMUTEX_INITIALIZER and SEM_INITIALIZER Oct 29, 2022
@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 4 times, most recently from bee9050 to 3085bb0 Compare October 29, 2022 17:51
Comment thread arch/arm/src/cxd56xx/cxd56_dmac.c
@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 2 times, most recently from a9b1c09 to c524607 Compare October 30, 2022 16:51
Comment thread arch/arm/src/cxd56xx/cxd56_hostif.c
Comment thread arch/arm/src/cxd56xx/cxd56_hostif.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread drivers/video/isx012.c
Comment thread drivers/usbhost/usbhost_xboxcontroller.c
Comment thread drivers/usbhost/usbhost_xboxcontroller.c
Comment thread drivers/usbhost/usbhost_xboxcontroller.c
Comment thread drivers/usbhost/usbhost_xboxcontroller.c
@masayuki2009

masayuki2009 commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

Hmm, it's too hard because the first commit is too big and has several changes other than the global mutex/sem initialization.

@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 2 times, most recently from 83f2c0d to fc65168 Compare November 2, 2022 19:02
@xiaoxiang781216

xiaoxiang781216 commented Nov 2, 2022

Copy link
Copy Markdown
Contributor Author

@masayuki2009 please review again, the change separate to small patch now.

@pkarashchenko pkarashchenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100 files reviewed

Comment thread arch/arm/src/sam34/sam_spi.c Outdated
Comment thread arch/arm/src/sam34/sam_twi.c Outdated
Comment thread drivers/usbhost/usbhost_xboxcontroller.c Outdated
Comment thread crypto/random_pool.c Outdated
Comment thread crypto/random_pool.c Outdated
Comment thread boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c Outdated
Comment thread boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c Outdated
@pkarashchenko

Copy link
Copy Markdown
Contributor

@gustavonihei could you please review ESP32 related files?

Comment thread arch/xtensa/src/esp32s2/esp32s2_spi.c Outdated
@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 4 times, most recently from 4c20c1b to bdb2c0c Compare November 5, 2022 03:57
Comment thread arch/arm/src/stm32/stm32_i2c_v2.c
Comment thread arch/arm/src/stm32f0l0g0/stm32_i2c.c
Comment thread arch/arm/src/stm32f7/stm32_i2c.c
Comment thread arch/arm/src/stm32h7/stm32_i2c.c
Comment thread arch/arm/src/stm32l4/stm32l4_1wire.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
Comment thread arch/arm/src/cxd56xx/cxd56_spi.c
@masayuki2009

masayuki2009 commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

@xiaoxiang781216
Please rebase this PR to the latest master and resolve the conflicts.

@xiaoxiang781216

Copy link
Copy Markdown
Contributor Author

@xiaoxiang781216 Please rebase this PR to the latest master and resolve the conflicts.

Done.

Comment thread arch/arm/src/sama5/sam_twi.c Outdated
Comment thread arch/arm/src/stm32f0l0g0/stm32_dma_v1.c Outdated
Comment thread arch/renesas/src/rx65n/rx65n_usbhost.c Outdated
Comment thread arch/xtensa/src/esp32s2/esp32s2_i2s.c Outdated
@xiaoxiang781216 xiaoxiang781216 force-pushed the nxmutex4 branch 3 times, most recently from 9e4410c to a0a002a Compare November 9, 2022 11:56
@xiaoxiang781216

Copy link
Copy Markdown
Contributor Author

@masayuki2009 @pkarashchenko please review again.

@pkarashchenko pkarashchenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general looks good. just few minor comments

Comment thread arch/renesas/src/rx65n/rx65n_usbhost.c Outdated
Comment thread arch/renesas/src/rx65n/rx65n_usbhost.c Outdated
Comment thread arch/renesas/src/rx65n/rx65n_usbhost.c Outdated
Comment thread arch/renesas/src/rx65n/rx65n_usbhost.c Outdated
anjiahao1 and others added 10 commits November 10, 2022 11:15
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

temp

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
and unlock the mutex before return

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
since both never fail

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

@pkarashchenko pkarashchenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@xiaoxiang781216

Copy link
Copy Markdown
Contributor Author

@masayuki2009 @pkarashchenko do you have more comment or merge it if no?

@pkarashchenko

Copy link
Copy Markdown
Contributor

I do not have more comments. Let's wait one more day to get feedback from @masayuki2009
I will merge the change if there will be no more comments.

@masayuki2009 masayuki2009 merged commit 8a8e115 into apache:master Nov 14, 2022
@xiaoxiang781216 xiaoxiang781216 deleted the nxmutex4 branch November 14, 2022 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants