--
--	Inmos Libraries
--	Copyright (C) 1988, 1989, 1990, 1991, 1993  Inmos Limited
--
--	This library is free software; you can redistribute it and/or
--	modify it under the terms of the GNU Lesser General Public
--	License as published by the Free Software Foundation; either
--	version 2 of the License, or (at your option) any later version.
--
--	This library is distributed in the hope that it will be useful,
--	but WITHOUT ANY WARRANTY; without even the implied warranty of
--	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--	Lesser General Public License for more details.
--
--	You should have received a copy of the GNU Lesser General Public
--	License along with this library; if not, write to the Free Software
--	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
--

--** @module hostio

#COMMENT "Host i/o library, V1.00, 10/03/89"
#COMMENT "(c) Copyright INMOS Limited 1989"
#COMMENT "KROC simplified version 1995"
#PRAGMA EXTERNAL "PROC C.exitoccam (INT result, VAL INT32 status) = 0"
#INCLUDE "hostio.inc"
--{{{  sp.exit
--* Terminate the server.
--
-- @param fs from server
-- @param ts to server
-- @param status a value which the server passes directly on to the
--   host environment, except in the following two cases: sps.success -
--   a host specific success result is passed on sps.failure - a host
--   specific failure result is passed on
-- @param result equals spr.ok if the operation succeeded; otherwise >=
--   spr.operation.failed - see hostio.inc or iserver documentation for
--   further details
PROC sp.exit (CHAN OF SP fs, ts, VAL INT32 status, BYTE result)
  --{{{  Call Unix
  INT res:
  SEQ
    C.exitoccam (res, status)
    IF
      res = 0
        result := spr.ok
      TRUE
        result := spr.operation.failed
  --}}}  
:
--}}}  sp.exit
--{{{  so.exit
--* Terminate the server.
--
-- @param fs from server
-- @param ts to server
-- @param status a value which the server passes directly on to the
--   host environment, except in the following two cases: sps.success -
--   a host specific success result is passed on sps.failure - a host
--   specific failure result is passed on
PROC so.exit (CHAN OF SP fs, ts, VAL INT32 status)
  BYTE result:
  sp.exit (fs, ts, status, result)
:
--}}}  so.exit
