Unpaired function used in lwip bindings Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
ych
Posts: 33
Joined: Tue Mar 03, 2015 11:38 pm
Has thanked: 7 times
Been thanked: 9 times

Unpaired function used in lwip bindings  Topic is solved

Postby ych » Sat Mar 17, 2018 1:45 pm

Today I mention that in sys_arch_protect and sys_arch_unprotect functions from sys_arch.c used functions from different subsystems, so my tiny patch:

Code: Select all

diff --git a/os/various/lwip_bindings/arch/sys_arch.c b/os/various/lwip_bindings/arch/sys_arch.c
index 95e32d92b..a3a080a66 100644
--- a/os/various/lwip_bindings/arch/sys_arch.c
+++ b/os/various/lwip_bindings/arch/sys_arch.c
@@ -217,7 +217,7 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread,
 
 sys_prot_t sys_arch_protect(void) {
 
-  return chSysGetStatusAndLockX();
+  return osalSysGetStatusAndLockX();
 }
 
 void sys_arch_unprotect(sys_prot_t pval) {

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Unpaired function used in lwip bindings

Postby Giovanni » Sat Mar 17, 2018 3:17 pm

There is a mix of "ch" and "osal" function, I think it should become all "ch" because "osal" functions do not cover everything, queued.

Giovanni

ych
Posts: 33
Joined: Tue Mar 03, 2015 11:38 pm
Has thanked: 7 times
Been thanked: 9 times

Re: Unpaired function used in lwip bindings

Postby ych » Sun Mar 18, 2018 7:34 am

I agree with you. In sys_arch.c used many functions with "ch" which could not be replaced by "osal", so it will be more clear if functions from only one subsystem use there.

I could provide the patch if necessary.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Unpaired function used in lwip bindings

Postby Giovanni » Sun Mar 18, 2018 8:51 am

Please go ahead.

Giovanni

ych
Posts: 33
Joined: Tue Mar 03, 2015 11:38 pm
Has thanked: 7 times
Been thanked: 9 times

Re: Unpaired function used in lwip bindings

Postby ych » Mon Mar 19, 2018 11:59 am

The patch is of course super trivial, but it is in attachments ;).
Attachments
lwip_bindings_one_fun_subsystem_patch.zip
(1.1 KiB) Downloaded 164 times

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Unpaired function used in lwip bindings

Postby Giovanni » Fri Mar 23, 2018 12:09 pm

Hi,

Patch merged in trunk and 18.2.x.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 18 guests