blob: 8321c4df34ac89d0c324556359c3d8bab8d82152 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
Jeff Johnson295189b2012-06-20 16:38:30 -07006#if !defined( __WLAN_QCT_PAL_SYNC_H )
7#define __WLAN_QCT_PAL_SYNC_H
8
9/**=========================================================================
10
11 \file wlan_pal_sync.h
12
13 \brief define synchronization objects PAL exports. wpt = (Wlan Pal Type) wpal = (Wlan PAL)
14
15 Definitions for platform independent.
16
17 Copyright 2010 (c) Qualcomm, Incorporated. All Rights Reserved.
18
19 Qualcomm Confidential and Proprietary.
20
21 ========================================================================*/
22
23#include "wlan_qct_pal_type.h"
24#include "wlan_qct_pal_status.h"
25#include "wlan_qct_os_sync.h"
26
27
28#define WLAN_PAL_WAIT_INFINITE 0xFFFFFFFF
29
30/*---------------------------------------------------------------------------
31 wpalMutexInit – initialize a mutex object
32 Param:
33 pMutex – a pointer to caller allocated object of wpt_mutex
34 Return:
35 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
36---------------------------------------------------------------------------*/
37wpt_status wpalMutexInit(wpt_mutex *pMutex);
38
39/*---------------------------------------------------------------------------
40 wpalMutexDelete – invalidate a mutex object
41 Param:
42 pMutex – a pointer to caller allocated object of wpt_mutex
43 Return:
44 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
45---------------------------------------------------------------------------*/
46wpt_status wpalMutexDelete(wpt_mutex *pMutex);
47
48/*---------------------------------------------------------------------------
49 wpalMutexAcquire – acquire a mutex object. It is blocked until the object is acquired.
50 Param:
51 pMutex – a pointer to caller allocated object of wpt_mutex
52 Return:
53 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
54---------------------------------------------------------------------------*/
55wpt_status wpalMutexAcquire(wpt_mutex *pMutex);
56
57/*---------------------------------------------------------------------------
58 wpalMutexRelease – Release a held mutex object
59 Param:
60 pMutex – a pointer to caller allocated object of wpt_mutex
61 Return:
62 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
63---------------------------------------------------------------------------*/
64wpt_status wpalMutexRelease(wpt_mutex *pMutex);
65
66/*---------------------------------------------------------------------------
67 wpalEventInit – initialize an event object
68 Param:
69 pEvent – a pointer to caller allocated object of wpt_event
70 Return:
71 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
72---------------------------------------------------------------------------*/
73wpt_status wpalEventInit(wpt_event *pEvent);
74
75/*---------------------------------------------------------------------------
76 wpalEventDelete – invalidate an event object
77 Param:
78 pEvent – a pointer to caller allocated object of wpt_event
79 Return:
80 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
81---------------------------------------------------------------------------*/
82wpt_status wpalEventDelete(wpt_event *pEvent);
83
84/*---------------------------------------------------------------------------
85 wpalEventWait – Wait on an event object
86 Param:
87 pEvent – a pointer to caller allocated object of wpt_event
88 timeout – timerout value at unit of milli-seconds. 0xffffffff means infinite wait
89 Return:
90 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
91---------------------------------------------------------------------------*/
92wpt_status wpalEventWait(wpt_event *pEvent, wpt_uint32 timeout);
93
94/*---------------------------------------------------------------------------
95 wpalEventSet – Set an event object to signaled state
96 Param:
97 pEvent – a pointer to caller allocated object of wpt_event
98 Return:
99 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
100---------------------------------------------------------------------------*/
101wpt_status wpalEventSet(wpt_event *pEvent);
102
103/*---------------------------------------------------------------------------
104 wpalEventReset – Set an event object to non-signaled state
105 Param:
106 pEvent – a pointer to caller allocated object of wpt_event
107 Return:
108 eWLAN_PAL_STATUS_SUCCESS – success. Fail otherwise.
109---------------------------------------------------------------------------*/
110wpt_status wpalEventReset(wpt_event *pEvent);
111
112
113#endif // __WLAN_QCT_PAL_SYNC_H