/* begincopyright
  Copyright (c) 1988 Xerox Corporation. All rights reserved.
  Use and copying of this software and preparation of derivative works based
  upon this software are permitted. Any distribution of this software or
  derivative works must comply with all applicable United States export
  control laws. This software is made available AS IS, and Xerox Corporation
  makes no warranty about the software, its performance or its conformity to
  any specification. Any person obtaining a copy of this software is requested
  to send their name and post office or electronic mail address to:
    PCR Coordinator
    Xerox PARC
    3333 Coyote Hill Rd.
    Palo Alto, CA 94304
  endcopyright */
/*
 * ThreadsMsgPrivate.h
 *
 * Demers, March 30, 1990 0:31:40 am PST
 */


#ifndef	←XR←THREADS←MSG←PRIVATE←
#define ←XR←THREADS←MSG←PRIVATE← 1

#ifndef XR←BASIC←TYPES←
#   include "BasicTypes.h"
#endif

#ifndef ←XR←THREADS←MSG←
#include "ThreadsMsg.h"
#endif

#define XR←GEN←ASSERT	0

/*
 * Well-known file descriptors
 */

/* ... for use in XR←Msg and XR←URead/XR←UWrite */

extern int XR←stdInFD;
extern int XR←stdOutFD;

/* ... for VP<->IOP communication */
/* ??? these should be moved ??? */

extern int XR←socket0FD;
extern int XR←socket1FD;

extern int XR←freeFD;




extern void
XR←ConsoleMsg (/* char *fmt, anyType arg1, ... */);
/*
    Like XR←Msg(XR←MSG←STDOUT, ...) except:
      (1) can be called from iop, handler, etc.
      (2) doesn't deal correctly with EINTR, etc.
*/

extern void
XR←Panic (/* msg */);
/*
    char *msg;
*/

extern bool
XR←GetSuspendOnPanic();

extern bool
XR←SetSuspendOnPanic(/* bool suspend */);
/*
    Query and control whether Panic causes system to
      - terminate
      - suspend itself for examination with a sophisticated
        source-level debugger, or dbx.
    May be called either before or after forking the virtual processors.
*/


#if XR←GEN←ASSERT

#define XR←ASSERT(b,s) if(!(b)) XR←Panic(s)

#else

#define XR←ASSERT(b,s)	{}

#endif /* XR←GEN←ASSERT */


#endif ←XR←THREADS←MSG←PRIVATE←