////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002 Xilinx, Inc.  All rights reserved.
//
// Xilinx, Inc.
// XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A 
// COURTESY TO YOU.  BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
// ONE POSSIBLE   IMPLEMENTATION OF THIS FEATURE, APPLICATION OR 
// STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
// IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE 
// FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.  
// XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO 
// THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO 
// ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE 
// FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY 
// AND FITNESS FOR A PARTICULAR PURPOSE.
// 
// $Id: config_param.h,v 1.1.2.1 2003/03/13 23:21:34 mohan Exp $
//
//////////////////////////////////////////////////////////////////////////////

/***************************************************************************/
/**
 * @file config_param.h 
 *
 * This file contains configuration parameter's for process Management, 
 * thread Management and semaphore routines.
 ***************************************************************************/
#ifndef _CONFIG_PARAM_H
#define _CONFIG_PARAM_H

#include <os_config.h>

/**
 * Scheduling type - See sched.h					
 */
#if SCHED_TYPE == 1 	/* SCHED_RR */
#ifdef N_PRIO /* was defined in os_config.h but the value is ignored here */
#undef N_PRIO
#endif
#define N_PRIO 1 	/**< N_PRIO always 1 for SCHED_RR */	
#define MIN_PRIORITY 0 	/**< Highest priority */
#define MAX_PRIORITY 0	/**< Least Priority */
#endif 

#if SCHED_TYPE == 2 	/* SCHED_PRIO */
#ifndef N_PRIO /* was not defined in os_config.h */
	#define N_PRIO 32	/**< Number of priority levels */
	/*
	 * The priority range of the process.
	 */
	#define MIN_PRIORITY 0 	/**< Highest priority */
	#define MAX_PRIORITY 31	/**< Least Priority */
#else /* N_PRIO is defined in os_config.h */
#define MIN_PRIORITY 0
#define MAX_PRIORITY (N_PRIO-1)
#endif
#endif	/* sched_type == 2 */


/************************************************************************/
/*	InterProcess Communication options				*/
/************************************************************************/
/* Semaphore Specific Configs */

#ifdef CONFIG_SEMA
#ifndef MAX_SEMA /* was not defined in os_config.h */
	#define MAX_SEMA 20		/**< Max Semaphore count */
#endif
#ifndef MAX_SEMA_WAITQ /* was not defined in os_config.h */
	#define MAX_SEMA_WAITQ 10	/**< Max semaphore wait Q length */
#endif
	#ifdef CONFIG_MSGQ 
#ifndef MAX_MSGSIZE /* was not defined in os_config.h */
	#define MAX_MSGSIZE  	20	/**< Max Message size in Mesg Q */
#endif
#ifndef MAX_MSG /* was not defined in os_config.h */
	#define MAX_MSG		20	/**< Max number of Mesg Q in system */
#endif
#endif 	/* CONFIG_MSGQ */
#endif 	/* CONFIG_SEMA */


/************************************************************************/
/* Memory Management related options.					*/
/************************************************************************/
/* Thread context memory block size */
#ifdef CONFIG_THREAD_SUPPORT
#ifndef MAX_THREADS /* was not defined in os_config.h */
#define MAX_THREADS		5	/**< Max number of threads 	*/
#endif
#ifndef THREAD_BSS_SIZE /* was not defined in os_config.h */
#define THREAD_BSS_BSIZE	600	/**< Should be a multiple of 4,
					     for word alignment		*/
#endif
#endif	/* CONFIG_THREAD_SUPPORT */

#endif	/* _CONFIG_PARAM_H */
