/*
 * $RCSfile: event_i.h,v $
 *
 * x-kernel v3.3
 *
 * Original Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 * Modifications Copyright (c) 1993 Massachusetts Board of Regents
 *
 * $Log: event_i.h,v $
 * Revision 1.2  1996/01/30 20:51:19  slm
 * Updated copyright and version.
 *
 * Revision 1.1  1995/07/29  02:40:49  slm
 * Initial revision
 *
 * Revision 1.1.1.1.1.1  1994/11/12  19:10:41  hkaram
 * New branch
 *
 * Revision 1.1.1.1  1994/03/14  21:15:05  umass
 * EVENT_INTERVAL raised to 50 msec
 *
 * Revision 1.1  1993/11/13  00:45:36  menze
 * Original version from UMass
 */

/* 
 * Event definitions for modules which work very closely with the
 * event subsystem.  
 */

#ifndef event_i
#define event_i

#include "process.h"

/*
 * EVENT_INTERVAL -- number of usec between scans of the event list
 * (event granularity).
 *
 */
#define EVENT_INTERVAL 50000       /* 50 milliseconds */

#define E_DETACHED_F	(1 << 0)
#define E_CANCELLED_F 	(1 << 1)


#ifdef XK_THREAD_TRACE

#  ifdef __STDC__

/* 
 * evMarkBlocked -- mark the current thread as blocked on the given
 * semaphore.   This is only used for thread monitoring.  The pointer
 * will just be treated as an integer (i.e., it doesn't have to be
 * valid.) 
 */
void	evMarkBlocked( Semaphore * );

/* 
 * evMarkRunning -- mark the current thread as running.
 * This is only used for thread monitoring.  
 */
void	evMarkRunning( void );

#  endif

/* 
 * localEventMap -- contains all x-kernel event structures.  Event
 * pointer is both the key and the bound object
 */
extern Map	localEventMap;


#endif

#ifdef __STDC__

void	evInit( void );

#endif

#endif
