10SN/A/*
2157SN/A * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
30SN/A * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
40SN/A * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
50SN/A *
60SN/A * This software is available to you under a choice of one of two
7157SN/A * licenses.  You may choose to be licensed under the terms of the GNU
80SN/A * General Public License (GPL) Version 2, available from the file
9157SN/A * COPYING in the main directory of this source tree, or the
100SN/A * OpenIB.org BSD license below:
110SN/A *
120SN/A *     Redistribution and use in source and binary forms, with or
130SN/A *     without modification, are permitted provided that the following
140SN/A *     conditions are met:
150SN/A *
160SN/A *      - Redistributions of source code must retain the above
170SN/A *        copyright notice, this list of conditions and the following
180SN/A *        disclaimer.
190SN/A *
200SN/A *      - Redistributions in binary form must reproduce the above
21157SN/A *        copyright notice, this list of conditions and the following
22157SN/A *        disclaimer in the documentation and/or other materials
23157SN/A *        provided with the distribution.
240SN/A *
250SN/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
260SN/A * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
270SN/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
280SN/A * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
290SN/A * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
300SN/A * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
310SN/A * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
320SN/A * SOFTWARE.
330SN/A *
340SN/A */
350SN/A
360SN/A/*
370SN/A * Abstract:
380SN/A *	Declaration of event object.
390SN/A */
400SN/A
410SN/A#ifndef _CL_EVENT_OSD_H_
420SN/A#define _CL_EVENT_OSD_H_
430SN/A
440SN/A#include <complib/cl_types.h>
450SN/A
460SN/A#ifdef __cplusplus
470SN/A#  define BEGIN_C_DECLS extern "C" {
480SN/A#  define END_C_DECLS   }
49#else				/* !__cplusplus */
50#  define BEGIN_C_DECLS
51#  define END_C_DECLS
52#endif				/* __cplusplus */
53
54BEGIN_C_DECLS
55#include <pthread.h>		/* usr/include */
56/*
57 * Linux user mode specific data structure for the event object.
58 * Users should not access these variables directly.
59 */
60typedef struct _cl_event_t {
61	pthread_cond_t condvar;
62	pthread_mutex_t mutex;
63	boolean_t signaled;
64	boolean_t manual_reset;
65	cl_state_t state;
66} cl_event_t;
67
68END_C_DECLS
69#endif				/* _CL_EVENT_OSD_H_ */
70