/*
 * event_i.h
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Revision: 1.3 $
 * $Date: 1996/02/01 15:22:05 $
 * 
 * HISTORY 
 * $Log: event_i.h,v $
 * Revision 1.3  1996/02/01 15:22:05  slm
 * Updated copyright and version.
 *
 * Revision 1.2  1995/08/28  16:15:20  acb
 * Initial revision for x3.3
 *
 * Revision 1.1  1994/10/26  20:45:44  hkaram
 * Initial revision
 */

/* 
 * 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).
 *
 * sparc verions needs this to be longer due to apparent
 *  bug in lwp_sleep (should be ~ 10000.)  cjt
 */
#define EVENT_INTERVAL 100000

#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
