qcacmn: Add QDF OS abstraction convergence

Converge ADF and CDF API's and move them to
QDF folder. MCL/WIN driver use this QDF converged
module for OS abstraction.

Change-Id: I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3
CRs-Fixed: 981187
This commit is contained in:
Chouhan, Anurag
2016-03-03 18:57:27 +05:30
committad av Gerrit - the friendly Code Review server
förälder 5693683262
incheckning 5776318d19
61 ändrade filer med 12554 tillägg och 9138 borttagningar

Visa fil

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -25,130 +25,40 @@
* to the Linux Foundation.
*/
#if !defined(__CDF_EVENT_H)
#define __CDF_EVENT_H
/**
* DOC: cdf_event.h
*
* Connectivity driver framework (CDF) events API
*
**/
* DOC: qdf_event.h
* This file provides OS abstraction for event APIs.
*/
#if !defined(__QDF_EVENT_H)
#define __QDF_EVENT_H
/* Include Files */
#include "cdf_status.h"
#include "cdf_types.h"
#include "i_cdf_event.h"
#include "qdf_status.h"
#include <qdf_types.h>
#include <i_qdf_event.h>
#include <qdf_trace.h>
/* Preprocessor definitions and constants */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Type declarations */
typedef __qdf_event_t qdf_event_t;
/* Function declarations and documenation */
/**
* cdf_event_init() - initializes the specified event
*
* @event: Pointer to CDF event object to initialize
*
* Initializes the specified event. Upon successful initialization the state
* of the event becomes initialized and not signaled.
*
* Return:
* CDF_STATUS_SUCCESS - Event was successfully initialized and is ready to
* be used
* Otherwise failure CDF reason code
*/
QDF_STATUS qdf_event_create(qdf_event_t *event);
CDF_STATUS cdf_event_init(cdf_event_t *event);
QDF_STATUS qdf_event_set(qdf_event_t *event);
/**
* cdf_event_set() - set a CDF event
*
* @event: Pointer of CDF event to set to the signalled state
*
* The state of the specified event is set to 'signalled by calling
* cdf_event_set(). The state of the event remains signalled until an
* explicit call to cdf_event_reset().
*
* Any threads waiting on the event as a result of a cdf_event_wait() will
* be unblocked and available to be scheduled for execution when the event
* is signaled by a call to cdf_event_set().
*
* Return:
* CDF_STATUS_SUCCESS - Event was successfully set
* Otherwise failure CDF reason code
*/
CDF_STATUS cdf_event_set(cdf_event_t *event);
QDF_STATUS qdf_event_reset(qdf_event_t *event);
/**
* cdf_event_reset() - reset a CDF event
*
* @event: Pointer of CDF event to reset
*
* The state of the specified event is set to 'NOT signalled' by calling
* cdf_event_reset(). The state of the event remains NOT signalled until an
* explicit call to cdf_event_set().
*
* This function sets the event to a NOT signalled state even if the event was
* signalled multiple times before being signaled.
*
* Return:
* CDF_STATUS_SUCCESS - Event was successfully reset
* Otherwise failure CDF reason code
*/
CDF_STATUS cdf_event_reset(cdf_event_t *event);
QDF_STATUS qdf_event_destroy(qdf_event_t *event);
/**
* cdf_event_destroy() - destroy a CDF event
*
* @event: Pointer of CDF event to destroy
*
* The function destroys the event object referenced by event.
* After a successful return from cdf_event_destroy() the event object becomes,
* in effect, uninitialized.
*
* A destroyed event object can be reinitialized using cdf_event_init();
* the results of otherwise referencing the object after it has been destroyed
* are undefined. Calls to CDF event functions to manipulate the lock such
* as cdf_event_set() will fail if the event is destroyed. Therefore,
* don't use the event after it has been destroyed until it has
* been re-initialized.
*
* Return:
* CDF_STATUS_SUCCESS - Event was successfully destroyed
* Otherwise failure CDF reason code
*/
CDF_STATUS cdf_event_destroy(cdf_event_t *event);
/**
* cdf_wait_single_event() - wait for a single input CDF event to be set
*
* @event: Pointer of CDF event to wait on
* @timeout: Timeout value in milli seconds
*
* This API waits for the event to be set. This function returns
* if this interval elapses, regardless if any of the events have
* been set. An input value of 0 for this timeout parameter means
* to wait infinitely, meaning a timeout will never occur.
*
*
* Return:
* CDF_STATUS_SUCCESS - the wait was satisifed by the event being
* set.
*
* CDF_STATUS_E_TIMEOUT - the timeout interval elapsed before the
* event was set.
*
* CDF_STATUS_E_INVAL - The value specified by event is invalid.
*/
CDF_STATUS cdf_wait_single_event(cdf_event_t *pEvent,
QDF_STATUS qdf_wait_single_event(qdf_event_t *event,
uint32_t timeout);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __CDF_EVENT_H */
#endif /* __QDF_EVENT_H */