Re: [PR] spinlock+sched_lock [nuttx]

2024-11-23 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1855252609 ## include/nuttx/spinlock.h: ## @@ -353,6 +354,8 @@ spin_trylock_wo_note(FAR volatile spinlock_t *lock) } SP_DMB(); + sched_lock_wo_note(); Review C

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-23 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1855199407 ## include/nuttx/spinlock.h: ## @@ -353,6 +354,8 @@ spin_trylock_wo_note(FAR volatile spinlock_t *lock) } SP_DMB(); + sched_lock_wo_note(); Review Comment:

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-23 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1855170734 ## include/nuttx/spinlock.h: ## @@ -291,6 +291,7 @@ static inline_function void spin_lock(FAR volatile spinlock_t *lock) /* Lock without trace note */

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1853192909 ## include/nuttx/spinlock.h: ## @@ -528,22 +567,29 @@ static inline_function irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret;

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1853193035 ## drivers/note/noterpmsg_driver.c: ## @@ -178,15 +181,15 @@ static bool noterpmsg_transfer(FAR struct noterpmsg_driver_s *drv, static void noterpmsg_work(FAR void *

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1853149005 ## sched/irq/irq_csection.c: ## @@ -232,7 +232,7 @@ irqstate_t enter_critical_section(void) DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0); - sp

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1853131138 ## sched/irq/irq_csection.c: ## @@ -232,7 +232,7 @@ irqstate_t enter_critical_section(void) DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0); -

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
hujun260 commented on PR #14578: URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2492653688 > please fix conflict done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the spec

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-21 Thread via GitHub
xiaoxiang781216 commented on PR #14578: URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2491663561 please fix conflict -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-18 Thread via GitHub
anchao commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1847669900 ## sched/sched/sched_lock.c: ## @@ -46,6 +46,25 @@ * Public Functions / +/*

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-18 Thread via GitHub
anchao commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1847606276 ## sched/sched/sched_lock.c: ## @@ -46,6 +46,25 @@ * Public Functions / +/*

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-18 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1847563134 ## sched/sched/sched_lock.c: ## @@ -46,6 +46,30 @@ * Public Functions / +/***

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-18 Thread via GitHub
anchao commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1847490565 ## sched/sched/sched_lock.c: ## @@ -46,6 +46,30 @@ * Public Functions / +/*

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-17 Thread via GitHub
xiaoxiang781216 commented on PR #14578: URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2482145105 @patacongo please review this patch which fix the long issue about sched lock. -- This is an automated message from the Apache Git Service. To respond to the message, please log

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-17 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1845964106 ## sched/sched/sched.h: ## @@ -37,6 +37,7 @@ #include #include #include +#include Review Comment: why add ## sched/sched/sched.h:

Re: [PR] spinlock+sched_lock [nuttx]

2024-11-01 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825398068 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_s

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825398068 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_s

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
anchao commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825389505 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_save(); +

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825398068 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_s

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825384484 ## arch/xtensa/src/esp32/esp32_ble_adapter.c: ## @@ -2353,12 +2353,7 @@ static int32_t esp_task_create_pinned_to_core(void *entry, DEBUGASSERT(task_handle != NULL)

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825383575 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_save();

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
anchao commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825311316 ## include/nuttx/spinlock.h: ## @@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile spinlock_t *lock) { irqstate_t ret; ret = up_irq_save(); +

Re: [PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
acassis commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1824542996 ## arch/xtensa/src/esp32/esp32_ble_adapter.c: ## @@ -2353,12 +2353,7 @@ static int32_t esp_task_create_pinned_to_core(void *entry, DEBUGASSERT(task_handle != NULL);

[PR] spinlock+sched_lock [nuttx]

2024-10-31 Thread via GitHub
hujun260 opened a new pull request, #14578: URL: https://github.com/apache/nuttx/pull/14578 ## Summary 1 Accelerated the implementation of sched_lock, remove enter_critical_section in sched_lock and only enter_critical_section when task scheduling is required. 2 we add sched_lock_