--
--	udc_funcs.occ -- user-defined channel stuff
--	Copyright (C) 2002 Fred Barnes <frmb2@ukc.ac.uk>
--
--	This program is free software; you can redistribute it and/or modify
--	it under the terms of the GNU General Public License as published by
--	the Free Software Foundation; either version 2 of the License, or
--	(at your option) any later version.
--
--	This program 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 General Public License for more details.
--
--	You should have received a copy of the GNU General Public License
--	along with this program; if not, write to the Free Software
--	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--

--{{{  module documentation
--** User-defined channels.
--
-- For more information, see
-- "[@link http://frmb.org/pubs/udc.ps User-Defined Channels in occam]".
--
-- @module udc

--}}}
--{{{  includes
#INCLUDE "udc.inc"
--}}}  
--{{{  externs in the C world
#PRAGMA EXTERNAL "PROC C.udc.softchan.alloc (RESULT INT addr) = 0"
#PRAGMA EXTERNAL "PROC C.udc.softchan.free (INT addr) = 0"
#PRAGMA EXTERNAL "PROC C.udc.bufchan.alloc (VAL INT size, RESULT INT addr) = 0"
#PRAGMA EXTERNAL "PROC C.udc.bufchan.free (INT addr) = 0"
#PRAGMA EXTERNAL "PROC C.udc.sockchan.alloc (VAL []BYTE hostname, VAL INT port, RESULT INT addr) = 0"
#PRAGMA EXTERNAL "PROC C.udc.sockchan.free (INT addr) = 0"
--}}}  
--{{{  PROCs
--{{{  PROC udc.softchan.alloc (RESULT INT addr)
PROC udc.softchan.alloc (RESULT INT addr)
  SEQ
    C.udc.softchan.alloc (addr)
:
--}}}  
--{{{  PROC udc.softchan.free (INT addr)
PROC udc.softchan.free (INT addr)
  SEQ
    C.udc.softchan.free (addr)
:
--}}}  
--{{{  PROC udc.bufchan.alloc (VAL INT size, RESULT INT addr)
PROC udc.bufchan.alloc (VAL INT size, RESULT INT addr)
  SEQ
    C.udc.bufchan.alloc (size, addr)
:
--}}}  
--{{{  PROC udc.bufchan.free (INT addr)
PROC udc.bufchan.free (INT addr)
  SEQ
    C.udc.bufchan.free (addr)
:
--}}}  
--{{{  PROC udc.sockchan.alloc (VAL []BYTE hostname, VAL INT port, RESULT INT addr)
PROC udc.sockchan.alloc (VAL []BYTE hostname, VAL INT port, RESULT INT addr)
  SEQ
    C.udc.sockchan.alloc (hostname, port, addr)
:
--}}}  
--{{{  PROC udc.sockchan.free (INT addr)
PROC udc.sockchan.free (INT addr)
  SEQ
    C.udc.sockchan.free (addr)
:
--}}}  
--}}}  

