Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame^] | 2 | * Copyright (c) 2012-2013 Qualcomm Atheros, Inc. |
| 3 | * All Rights Reserved. |
| 4 | * Qualcomm Atheros Confidential and Proprietary. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 5 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 6 | #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 | ---------------------------------------------------------------------------*/ |
| 37 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 46 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 55 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 64 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 73 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 82 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 92 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 101 | wpt_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 | ---------------------------------------------------------------------------*/ |
| 110 | wpt_status wpalEventReset(wpt_event *pEvent); |
| 111 | |
| 112 | |
| 113 | #endif // __WLAN_QCT_PAL_SYNC_H |