/* Copyright 1999 PSO Systems Inc */

#ifndef __PORT_COMMON_H__
#define __PORT_COMMON_H__

#define MESSAGE_RING_SIZE	100	/* XXX */
struct mesg_arg {
	int type;
	void *ptr;
};

#define MSG_TYPE_SIMPLE		1
#define MSG_TYPE_FANCY		2

struct mutex_type {
	char sem[VX_SEM_SIZE];	/* XXX */
	int owner;	/* thread id */
	int holdings;
	int flags;
};

/* these five flags used when we are tsleep'ing on a mutex.  There are five spl
mutex'es used in bsd_compat.c.   For each of them we need to mark a flag, if
they are currently being held by us.  When we return from tsleep, we
re-take the spl mutexes based on these flags.  So these flags are not used
for spl mutexes.  They are used for other mutexes that gets called via tsleep
if the thread calling tsleep has taken any of the spl mutexes. 
These flags are also used in a thread context block using one of the
aplication specific thread context variable.  */

#define PSO_SPLSOFTNET		0x1
#define PSO_SPLNET		0x2
#define PSO_SPLIMP		0x4
#define PSO_SPLHIGH		0x8
#define PSO_SPLCLOCK		0x10

#define PSO_SPLSTUFF		0x1f	/* all SPL stuff, mask */

#endif
