~ubuntu-branches/ubuntu/trusty/mit-scheme/trusty

« back to all changes in this revision

Viewing changes to src/microcode/prosio.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Hanson
  • Date: 2010-03-10 02:00:45 UTC
  • mfrom: (1.1.7 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100310020045-4np1y3ro6sk2oz92
Tags: 9.0.1-1
* New upstream.
* debian/watch: Fix, previous version was broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*-C-*-
2
2
 
3
 
$Id: prosio.c,v 1.30 2008/01/30 20:02:19 cph Exp $
4
 
 
5
3
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
6
4
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
7
 
    2006, 2007, 2008 Massachusetts Institute of Technology
 
5
    2006, 2007, 2008, 2009, 2010 Massachusetts Institute of Technology
8
6
 
9
7
This file is part of MIT/GNU Scheme.
10
8
 
67
65
  }
68
66
  PRIMITIVE_RETURN (UNSPECIFIC);
69
67
}
 
68
 
 
69
DEFINE_PRIMITIVE ("CHANNEL-SYNCHRONIZE", Prim_channel_synchronize, 1, 1,
 
70
  "(CHANNEL)\n\
 
71
Synchronize CHANNEL with any permanent storage associated with it,\n\
 
72
forcing any buffered data to be written permanently.")
 
73
{
 
74
  PRIMITIVE_HEADER (1);
 
75
  OS_channel_synchronize (arg_channel (1));
 
76
  PRIMITIVE_RETURN (UNSPECIFIC);
 
77
}
70
78
 
71
79
DEFINE_PRIMITIVE ("CHANNEL-TABLE", Prim_channel_table, 0, 0,
72
80
  "Return a vector of all channels in the channel table.")
196
204
       : (BOOLEAN_TO_OBJECT (result == 0)));
197
205
  }
198
206
}
199
 
 
 
207
 
200
208
DEFINE_PRIMITIVE ("CHANNEL-NONBLOCKING", Prim_channel_nonblocking, 1, 1,
201
209
  "Put CHANNEL in non-blocking mode.")
202
210
{
227
235
    PRIMITIVE_RETURN (result);
228
236
  }
229
237
}
 
238
 
 
239
DEFINE_PRIMITIVE ("NEW-MAKE-PIPE", Prim_new_make_pipe, 2, 2,
 
240
  "Store the reader and writer of a new pipe in the cdrs of weak pairs.")
 
241
{
 
242
  PRIMITIVE_HEADER (2);
 
243
  CHECK_ARG (1, WEAK_PAIR_P);
 
244
  CHECK_ARG (2, WEAK_PAIR_P);
 
245
  {
 
246
    Tchannel reader;
 
247
    Tchannel writer;
 
248
    OS_make_pipe ((&reader), (&writer));
 
249
    SET_PAIR_CDR ((ARG_REF (1)), (long_to_integer (reader)));
 
250
    SET_PAIR_CDR ((ARG_REF (2)), (long_to_integer (writer)));
 
251
    PRIMITIVE_RETURN (UNSPECIFIC);
 
252
  }
 
253
}
230
254
 
231
255
/* Select registry */
232
256