/*
Copyright (c) 1993 Xerox Corporation.  All rights reserved.
*/
/*
$Id$

$Date$
 */

/*
 * PCR support for BSD-style shared memory.
 *
 * Host Dependent.
 */

#ifndef	←←PCR←ShmBSD←h
#define ←←PCR←ShmBSD←h 1

#include <config/PCR←StdTypes.h>
#include <config/PCR←OS.h>

#if (PCR←OS←MMAP)
#   define PCR←ShmBSD←IMPL	1
#else
#   define PCR←ShmBSD←IMPL      0
#endif

#include <th/PCR←ThTypes.h>

#if defined(PCR←OS←SUNOS4) || defined(PCR←OS←SUNOS5)
#   include <host/sys/types.h>
#   include <host/sys/mman.h>
#endif



#if (PCR←ShmBSD←IMPL)

extern PCR←ERes
PCR←ShmBSD←GetPageSize(void);


extern PCR←ERes
PCR←ShmBSD←MMap(
    caddr←t addr,
    size←t len,
    int prot,
    int flags,
    int fd,
    off←t off,
    caddr←t *where
);


extern PCR←ERes
PCR←ShmBSD←MUnmap(
    caddr←t addr,
    size←t len
);


extern PCR←ERes
PCR←ShmBSD←MProtect(
    caddr←t addr,
    size←t len,
    int prot
);





#elif defined(PCR←NO←HOSTDEP←ERR)
    /* ... */
#else
#   error ShmBSD unimplemented for this host / os
#endif

#endif /* !←←PCR←ShmBSD←h */

/*
$Log$
*/