/***************************************************************************
	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.
***************************************************************************/
/***************************************************************************/
/**
 * @file mutex.h 
 *
 * This contains the function decleration for mutex routines.
 ***************************************************************************/
#ifndef _MUTEX_H
#define _MUTEX_H

#include <os_config.h>
#include <config_param.h>

#define MAX_MUTEX 16


/**
 * Each mutex is associated with this structure.
 */
typedef struct _mutex {
	signed char  mutex_id ;	/**< Mutex ID */
	signed char  process_id ;	/**< ID of process holding this mutex */
	int mutex_val ;
} mutex ;
		
/*
 * Function prototypes defined in sys/mutex.c
 */

void mutex_heap_init() ;
int mutex_init( mutex **mymutex ) ;
int mutex_lock( mutex *mymutex ) ;
int mutex_unlock( mutex *mymutex ) ;
int mutex_destroy( mutex *mymutex ) ;
	
#endif
