bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full-time developer available


From: Samuel Thibault
Subject: Re: Full-time developer available
Date: Thu, 17 Sep 2015 01:34:55 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Robert Millan, le Tue 15 Sep 2015 22:11:15 +0200, a écrit :
> I was planning to ask for advice on how to make a "/dev/audio -> librump0"
> translator sometime soon. I've written similar a glue layer for Linux [1],
> but I'm missing a lot of knowledge when it comes to the Hurd way of doing
> this (like, how to service ioctls without libtrivfs?).

Serving ioctls is a matter of adding the ioctl multiplexer in your rpc
loop.  Again, see term/main.c, it simply calls tioctl_server_routine
in demuxer, and that will call all the S_tioctl_* functions.  For
e.g. OSS ioctls, you can check how the requets get encoded in
/usr/include/i386-gnu/bits/ioctls.h (or perhaps just print their value),
and see sysdeps/mach/hurd/ioctl.c how glibc makes the RPC: the RPC msgid
is computed from the request value with the IOC_MSGID macro. See our
sys/soundcard.h, it uses for instance group 'p' for DSPs. It's then a
matter of defining the rpcs in pioctl.defs files with the corresponding
msgid base, enumerating the ioctl commands there.  Then use the same
rules as the hurd package to build the pioctlServer.c file which will
multiplex the RPCs into calls to the S_pioctl_* functions.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]