patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9832, Contrib: Unix port: improve...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9832: Contrib: Unix port: improve support for the Hurd

Submitter:  Joan Lledó <jllledo>
Submitted:  Sun 14 Jul 2019 10:41:38 AM UTC
   
 
Category:  Contrib Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Thu 01 Aug 2019 07:11:26 PM UTC, comment #7: 

OK, applied with that change.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 26 Jul 2019 06:38:33 PM UTC, comment #6: 

comment #5:

> Wait, so SYS_ARCH_INTR is a private constant only valid in sys_arch.c? Why do you define it in sys_arch.h then?


Oops! it's because it was there in the previous version of the patch, my fault...

> Are you ok with me moving it to sys_arch.c?


Totally

Joan Lledó <jllledo>
Fri 26 Jul 2019 06:26:34 PM UTC, comment #5: 

Wait, so SYS_ARCH_INTR is a private constant only valid in sys_arch.c? Why do you define it in sys_arch.h then? Are you ok with me moving it to sys_arch.c before applying? That way, you wouldn't need to send another version...

Simon Goldschmidt <goldsimon>
Group administrator
Sat 20 Jul 2019 10:51:15 AM UTC, comment #4: 

I think its better to separate patches, as they are different issues. I left the declaration of SYS_ARCH_INTR in sys_arch.h for unix, but this macro is now only returned by con cond_wait() which is static, and sys_arch_sem_wait() justs returns 0 when interrupted.

Joan Lledó <jllledo>
Wed 17 Jul 2019 04:31:02 PM UTC, comment #3: 

Oh, ok. Of course it makes sense to implement tgis, but then, the define has to be added and documented globally. Plus, all callers need to check it and behave accordingly. Then the socket API can finally support this type of return code properly.

I can start this by adding your patch and I'll try to see where things have to be moved...

But maybe it's better to separate this and apply the rest of your patch first.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 17 Jul 2019 04:04:10 PM UTC, comment #2: 

comment #1:

> I was about to push this one, but then I found a question: who handles SYS_ARCH_INTR as return code from 'sys_arch_sem_wait'?
>
> Wouldn't it require error handling code at netconn or socket layer?


Actually, I don't need it nor use it, but I added it because of this thread:

https://lists.gnu.org/archive/html/lwip-devel/2019-04/msg00023.html

Maybe I misunderstood what you meant.

> And why doesn't 'sys_arch_mbox_fetch' check this return value?


Probably, and there are more functions calling sys_arch_sem_wait()...

Shall I remove it?

Joan Lledó <jllledo>
Tue 16 Jul 2019 07:36:23 PM UTC, comment #1: 

I was about to push this one, but then I found a question: who handles SYS_ARCH_INTR as return code from 'sys_arch_sem_wait'?

Wouldn't it require error handling code at netconn or socket layer?

And why doesn't 'sys_arch_mbox_fetch' check this return value?

Simon Goldschmidt <goldsimon>
Group administrator
Sun 14 Jul 2019 10:41:38 AM UTC, original submission:  

- contrib/ports/unix/port/sys_arch.c: sys_arch_sem_wait() and cond_wait():
  - On the Hurd, pthread_cond_wait() and pthread_cond_timedwait() are awakened when
      glibc cancels the RPC that called them. I wrote some code to handle this case.
  - contrib/ports/unix/port/include/arch/sys_arch.h: I defined SYS_ARCH_INTR to be
    returned by sys_arch_sem_wait() when pthread_cond_wait() was awakened on the Hurd.

- contrib/ports/unix/check/CMakeLists.txt: Add support for the Hurd:
  - Line 7: add AND NOT CMAKE_SYSTEM_NAME STREQUAL GNU
  - Line 12: set(LWIP_USE_SANITIZERS true) only if (NOT CMAKE_SYSTEM_NAME STREQUAL GNU)
  - Line 48: add OR CMAKE_SYSTEM_NAME STREQUAL GNU

More info at:

https://lists.nongnu.org/archive/html/lwip-devel/2019-07/msg00001.html

Joan Lledó <jllledo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jllledo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-01 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2019-07-20 jllledo Attached File- Added 0001-Unix-port-improve-support-for-the-Hurd.patch, #47242
    2019-07-14 jllledo Attached File- Added 0001-Unix-port-improve-support-for-the-Hurd.patch, #47211

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code