1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
24  */
25 
26 /*
27  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /*
32  *
33  * MODULE: dapl_evd_disable.c
34  *
35  * PURPOSE: EVENT management
36  *
37  * Description: Interfaces in this file are completely defined in
38  *              the uDAPL 1.1 API, Chapter 6, section 3
39  *
40  * $Id: dapl_evd_disable.c,v 1.6 2003/06/16 17:53:32 sjs2 Exp $
41  */
42 
43 #include "dapl.h"
44 
45 /*
46  * dapl_evd_disable
47  *
48  * DAPL Requirements Version xxx, 6.3.2.5
49  *
50  * Modify the size fo the event queue of an Event Dispatcher
51  *
52  * Input:
53  * 	evd_handle
54  *
55  * Output:
56  * 	none
57  *
58  * Returns:
59  * 	DAT_SUCCESS
60  * 	DAT_INVALID_HANDLE
61  */
62 
dapl_evd_disable(IN DAT_EVD_HANDLE evd_handle)63 DAT_RETURN dapl_evd_disable(
64 	IN	DAT_EVD_HANDLE	   evd_handle)
65 {
66 	DAPL_EVD		*evd_ptr;
67 	DAT_RETURN		dat_status;
68 
69 	evd_ptr = (DAPL_EVD *)evd_handle;
70 	dat_status = DAT_SUCCESS;
71 
72 	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
73 		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
74 		goto bail;
75 	}
76 
77 	evd_ptr->evd_enabled = DAT_FALSE;
78 
79 bail:
80 	return (dat_status);
81 }
82