blob: 6d081bc7bc2d74eb16ac9633aafe3789d1cd6382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*********************************************************
* Copyright (C) 2004 VMware, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Common
* Development and Distribution License (the "License") version 1.0
* and no later version. You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* http://www.opensource.org/licenses/cddl1.php
*
* See the License for the specific language governing permissions
* and limitations under the License.
*
*********************************************************/
/*
* request.h --
*
* Prototypes for request initialization, allocation, and list manipulation
* functions.
*
*/
#ifndef __REQUEST_H_
#define __REQUEST_H_
#include <sys/ksynch.h> /* mutexes and condition variables */
#include "hgfsSolaris.h"
#include "debug.h"
#include "dbllnklst.h" /* Double link list types */
/*
* Macros
*/
/* Since the DblLnkLst_Links in the superinfo is just an anchor, we want to
* skip it (e.g., get the container for the next element) */
#define HGFS_REQ_LIST_HEAD(si) \
(DblLnkLst_Container(si->reqList.next, HgfsReq, listNode))
#define HGFS_REQ_LIST_HEAD_NODE(si) \
(si->reqList.next)
#define HGFS_FREE_REQ_LIST_HEAD(si) \
(DblLnkLst_Container(si->reqFreeList.next, HgfsReq, listNode))
#define HGFS_FREE_REQ_LIST_HEAD_NODE(si) \
(si->reqFreeList.next)
/*
* Functions
*/
void HgfsInitRequestList(HgfsSuperInfo *sip);
void HgfsCancelAllRequests(HgfsSuperInfo *sip);
INLINE Bool HgfsListIsEmpty(DblLnkLst_Links *listAnchor);
HgfsReq *HgfsGetNewReq(HgfsSuperInfo *sip);
void HgfsDestroyReq(HgfsSuperInfo *sip, HgfsReq *oldReq);
int HgfsSendRequest(HgfsSuperInfo *sip, HgfsReq *req);
INLINE void HgfsWakeWaitingClient(HgfsSuperInfo *sip, HgfsReq *req);
#endif /* __REQUEST_H_ */
|