Re: [PATCH rust] Add new target for GNU/Hurd

2023-07-10 Thread Damien Zammit
Hi, On 11/7/23 05:53, Samuel Thibault wrote: > Sergey Bugaev, le lun. 10 juil. 2023 12:22:21 +0300, a ecrit: >> I don't think that's correct. For one thing, dev_t is __UWORD_TYPE >> (like Rust usize) since glibc commit >> 0ec48e3337506fcd33abdd86b5ab9e331564b65c, and it was u32 before that. > > U

Re: [PATCH v6 1/2 hurd] libirqhelp: Add library

2023-07-10 Thread Damien Zammit
Hi, On 11/7/23 05:47, Samuel Thibault wrote: > Damien Zammit, le lun. 10 juil. 2023 09:02:10 +, a ecrit: >> +void >> +irqhelp_wait_init(struct irq *irq) >> +{ >> + if (!irq) >> +{ >> + log_error("cannot wait on this irq to be ready\n"); >> + return; >> +} >> + >> + sem_wait

Re: [PATCH rust-libc] i386-gnu: Add GNU/Hurd os

2023-07-10 Thread Samuel Thibault
Sergey Bugaev, le lun. 10 juil. 2023 12:51:15 +0300, a ecrit: > On Sun, Jul 9, 2023 at 1:06 PM Damien Zammit wrote: > > diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs > > new file mode 100644 > > index 0..676ea2515 > > --- /dev/null > > +++ b/src/unix/hurd/mod.rs > > @@ -0,0 +1,2

Re: [PATCH rust] Add new target for GNU/Hurd

2023-07-10 Thread Samuel Thibault
Sergey Bugaev, le lun. 10 juil. 2023 12:22:21 +0300, a ecrit: > On Sun, Jul 9, 2023 at 1:05 PM Damien Zammit wrote: > > supported_targets! { > > +("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu), > > Arguably the target should be i686-unknown-gnu, llvm calls it i686-unknown-hurd-gnu (that w

Re: [PATCH v6 1/2 hurd] libirqhelp: Add library

2023-07-10 Thread Samuel Thibault
Damien Zammit, le lun. 10 juil. 2023 09:02:10 +, a ecrit: > +void > +irqhelp_wait_init(struct irq *irq) > +{ > + if (!irq) > +{ > + log_error("cannot wait on this irq to be ready\n"); > + return; > +} > + > + sem_wait(&irq->sema); > +} So, is this wait really necessary? Why

Re: [PATCH rust-libc] i386-gnu: Add GNU/Hurd os

2023-07-10 Thread Sergey Bugaev
On Sun, Jul 9, 2023 at 1:06 PM Damien Zammit wrote: > Autogenerated mod.rs in 2021 with: > > bindgen input.h -- --sysroot=./hurd-headers -I./hurd-headers/include \ > -I./hurd-headers/include/i386-gnu -target i386-gnu > mod.rs I realize this is autogenerated and not written by you, but: >

Re: [PATCH rust] Add new target for GNU/Hurd

2023-07-10 Thread Sergey Bugaev
Hi Damien, Vedant -- this is exciting! Some nitpicks (to add to what Amos says) inline. On Sun, Jul 9, 2023 at 1:05 PM Damien Zammit wrote: > supported_targets! { > +("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu), Arguably the target should be i686-unknown-gnu, and target_os = "gnu". LLV

[PATCH v6 1/2 hurd] libirqhelp: Add library

2023-07-10 Thread Damien Zammit
--- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 378 +++ libirqhelp/irqhelp.h | 52 ++ 4 files changed, 459 insertions(+) create mode 100644 libirqhelp/Makefile create mode 100644 libirqhelp/irqhelp.c create

[PATCH v6 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2023-07-10 Thread Damien Zammit
--- libddekit/Makefile| 2 +- libddekit/interrupt.c | 206 +- 2 files changed, 24 insertions(+), 184 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 100644 --- a/libddekit/Makefile +++ b/libddekit/Makefile

[PATCH v6 0/2 hurd] irqhelp + simplify ddekit

2023-07-10 Thread Damien Zammit
Addressed all the review points from v5. This adds an irqhelp library for simplified user irq registration. The second patch implements the use case for ddekit (netdde). TESTED: Recompiled netdde.static and copied a 2GB file inbound at 1.8MB/sec. Also tried ifdown and ifup a few times, works as b