9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] change for libthread/ioproc.c
@ 2003-01-24 10:15 Fco.J.Ballesteros
  2003-01-28 21:24 ` David Gordon Hogan
  0 siblings, 1 reply; 2+ messages in thread
From: Fco.J.Ballesteros @ 2003-01-24 10:15 UTC (permalink / raw)
  To: 9fans

Hi,

	when you create an ioproc and later interrupt it with iointerrupt,
(since there's no handler set) the xioproc process dies. This means that
the process performing the iocall hangs forever waiting in the receive from
the ioproc channel.

I think that xioproc() could add this near its begin:

	threadnotify(ionoted, 1);

with

	static int
	ionoted(void*, char* n)
	{
		return (strcmp(n, "interrupt") == 0);
	}


The result is that iointerrupt interrupts the current io operation which then
returns -1 with the `interrupted' status.

If there's anything else I'm missing and the current code should work
correctly I'd be happy to know it (I already changed our libthread).

hth



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] change for libthread/ioproc.c
  2003-01-24 10:15 [9fans] change for libthread/ioproc.c Fco.J.Ballesteros
@ 2003-01-28 21:24 ` David Gordon Hogan
  0 siblings, 0 replies; 2+ messages in thread
From: David Gordon Hogan @ 2003-01-28 21:24 UTC (permalink / raw)
  To: 9fans

> 	when you create an ioproc and later interrupt it with iointerrupt,
> (since there's no handler set) the xioproc process dies. This means that
> the process performing the iocall hangs forever waiting in the receive from
> the ioproc channel.

I just changed iointerrupt() to post "threadint" instead of "interrupt".
"threadint" is ignored by _threadnote(), which should have the desired
effect.  Update on sources.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-28 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-24 10:15 [9fans] change for libthread/ioproc.c Fco.J.Ballesteros
2003-01-28 21:24 ` David Gordon Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).