Commit Graph

2 Commits

Author SHA1 Message Date
manu 23f31f2a3a First implementation of IRIX /dev/usemaclone functionnalities. This
successfully emulates a few test program that use poll semaphores,
including the attach-to-file-descriptor-and-select feature.

There are a few issues:
1) at least one ioctl need to set retval. We handle this in irix_sys_ioctl()
by replacing the data argument by a pointer to a strucutre in the stackgap
that carries the real data and retval. The underlying ioctl methods can
therefore retreive both data and retval.

2) usemaclone is a cloning device: each time it is open, it creates a new
context, and ioctl operation on each open file descriptor will lead to
different behavior. This functionnality is available in NetBSD through the
devvp branch. This first implementation does not use devvp yet, but this
should be done later. Currently, we create a new vnode, and we provide our
own vnode operations. Some operation are applied to the cloned vnode, others
are applied to the original vnode. The v_data field is used to hold a
reference to the original vnode so that we can work on it.

3) at least the setattr vnode operation needs some customisation: IRIX
libc relies on the fact that fchmod on /dev/usema will return 0 in case
of failure.
2002-05-22 05:14:00 +00:00
manu cb99a5f48e Implements SIOCNREAD ioctl (some kind of FIONREAD for sockets only). This
makes X11 binaries able to actually work: most of them were previously hang
in infinite loop wiaiting for data from the X server because SIOCNREAD
reported that some data where to be read whereas the X server had nothing
to say.

Tested (and works): xlogo, xterm, ghostview (IRIX build). Things are getting
interesting...
2002-03-03 20:12:17 +00:00