From: Chris Hanson Date: Thu, 8 Nov 1990 11:08:07 +0000 (+0000) Subject: * (UX_channel_close_all): Don't signal errors -- this is run when X-Git-Tag: 20090517-FFI~11099 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dd3c4e5116d3f609e0b7a4b6edd21aa829fcb3a1;p=mit-scheme.git * (UX_channel_close_all): Don't signal errors -- this is run when there is no runtime system to field them, and in any case they can be safely ignored here. * (OS_channel_close_on_abort): New utility procedure. --- diff --git a/v7/src/microcode/uxio.c b/v7/src/microcode/uxio.c index 788f23b96..31b9f1d75 100644 --- a/v7/src/microcode/uxio.c +++ b/v7/src/microcode/uxio.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.5 1990/08/16 19:22:41 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.6 1990/11/08 11:08:07 cph Exp $ Copyright (c) 1990 Massachusetts Institute of Technology @@ -44,7 +44,7 @@ DEFUN_VOID (UX_channel_close_all) Tchannel channel; for (channel = 0; (channel < OS_channel_table_size); channel += 1) if (CHANNEL_OPEN_P (channel)) - OS_channel_close (channel); + OS_channel_close_noerror (channel); } void @@ -88,7 +88,7 @@ DEFUN_VOID (channel_allocate) channel += 1; } } - + int DEFUN (OS_channel_open_p, (channel), Tchannel channel) { @@ -112,6 +112,20 @@ DEFUN (OS_channel_close_noerror, (channel), Tchannel channel) UX_close (CHANNEL_DESCRIPTOR (channel)); MARK_CHANNEL_CLOSED (channel); } + +static void +DEFUN (channel_close_on_abort_1, (cp), PTR cp) +{ + OS_channel_close (* ((Tchannel *) cp)); +} + +void +DEFUN (OS_channel_close_on_abort, (channel), Tchannel channel) +{ + Tchannel * cp = (dstack_alloc (sizeof (Tchannel))); + (*cp) = (channel); + transaction_record_action (tat_abort, channel_close_on_abort_1, cp); +} enum channel_type DEFUN (OS_channel_type, (channel), Tchannel channel)