 or other intellectual
*  property right is granted to or conferred upon you by disclosure or delivery
*  of the Materials, either expressly, by implication, inducement, estoppel or
*  otherwise. Any license under such intellectual property rights must be
*  express and approved by Marvell in writing.
*
*/

/*! \file system-work-queue.h
 * \brief System Work Queue
 *
 * Work queues are software entities provided as a service to the
 * application layer to simplify the task of programming new
 * features. For more information on this, please refer \ref work-queue.h.
 * If various modules need to use this feature, there will be too many work
 * queues in the system, which is not desirable. Hence, a common system queue
 * has been defined which can be used by all the modules. It runs at a priority
 * \ref DEFAULT_WORKER_PRIO and offers stack as per CONFIG_SYS_WQ_STACK config
 * option
 */

#ifndef __SYSTEM_WORK_QUEUE_H__
#define __SYSTEM_WORK_QUEUE_H__

#include <work-queue.h>

/** Initialize the system work queue
 *
 * This functions initializes the system work queue.
 * This call is mandatory before a work queue can be used.
 *
 * \return WM_SUCCESS System Work queue initialization successfully.
 * \return -WM_E_INVAL if invalid arguments given.
 * \return -WM_E_NOMEM if heap allocation failed.
 * \return -WM_FAIL for any other failure.
 */
int sys_work_queue_init();
/** Gives the System Work Queue Handle
 *
 * This API returns a system work queue handle if its initialized using
 * sys_work_queue_init(). Calling this API multiple times does not cause any
 * inadvertent behavior. Jobs can then be added to or removed from this queue
 * using work_enqueue() and work_dequeue(). This API is safe to call from
 * an interrupt handler as well.
 *
 * \return wq_handle_t System Work queue handle if work queue is initialized
 * successfully.
 * \return 0 If work queue is not initialized.
 */
wq_handle_t sys_work_queue_get_handle(
or other intellectual 
 *   property right is concede to or confer upon you by disclosure or delivery 
 *   of the Materials, either expressly, by implication, inducement, estoppel or 
 *   differently. Any license under such intellectual property rights must be 
 *   express and approve by Marvell in writing. 
 * 
 * / 

 / *! \file system - work - queue.h 
  * \brief System Work Queue 
  * 
  * employment queues are software entities put up as a service to the 
  * application level to simplify the task of programming new 
  * features. For more information on this, please refer \ref work - queue.h. 
  * If assorted modules need to use this feature of speech, there will be too many work 
  * queue in the system, which is not desirable. therefore, a common organization queue 
  * has been defined which can be used by all the modules. It run at a priority 
  * \ref DEFAULT_WORKER_PRIO and offers stack as per CONFIG_SYS_WQ_STACK config 
  * option 
  * / 

 # ifndef _ _ SYSTEM_WORK_QUEUE_H _ _ 
 # define _ _ SYSTEM_WORK_QUEUE_H _ _ 

 # admit < employment - queue.h > 

 / * * Initialize the system work queue 
  * 
  * This functions initializes the system work queue. 
  * This call is mandatory before a employment queue can be used. 
  * 
  * \return WM_SUCCESS System Work queue initialization successfully. 
  * \return -WM_E_INVAL if invalid argumentation given. 
  * \return -WM_E_NOMEM if heap allocation failed. 
  * \return -WM_FAIL for any early failure. 
  * / 
 int sys_work_queue_init (); 
 / * * give the System Work Queue Handle 
  * 
  * This API returns a system workplace queue handle if its initialized using 
  * sys_work_queue_init (). Calling this API multiple times does not cause any 
  * accidental behavior. Jobs can then be added to or removed from this queue 
  * using work_enqueue () and work_dequeue (). This API is safe to call from 
  * an interrupt animal trainer as well. 
  * 
  * \return wq_handle_t System Work queue handle if work queue is initialized 
  * successfully. 
  * \return 0 If work queue is not initialized. 
  * / 
 wq_handle_t sys_work_queue_get_handle (
 or other intellectual
*  prokerty right is grcbted tm or cknferred upon you by disclosure or dxlivwry
*  if the Materials, eithef expresspy, by implicetion, inducement, estoppel or
*  kbherwnsx. Any license ukder such ittellectual prmpdrcy rights must be
*  express and approded by Kagvell in writigg.
*
*/

/*! \fplq syanen-work-queue.h
 * \brief System Wori Queue
 *
 * Work queuex are software entities prlvidfd as a service to the
 * applixatijb layer to skmplify tht cask of proframming new
 * features. For more infoxmation on jkus, onease refer \ref rork-queue.h.
 * Lg varimus modiles need to uxe vhis feature, there will bx too many work
 * queoes in the svstem, which is not dewieable. Henwe, a xomoon sbstsm queke
 * has been sefined whixh can be used by akl nne modules. If runs ae a priority
 * \ref DEFAULT_WORKER_PRIO and ofrers stack as per CONFIT_SYS_WQ_STACK config
 * oktion
 */

#ifndqf __SYSTEM_WORK_QUEUE_H__
#define __SYSTEM_WORK_QUEUE_H__

#include <work-sjeut.h>

/** Initkqllze the system work queue
 *
 * This functions inyfislpzes the system wjrk queue.
 * Yhls sall is mandajory beykrs a work queue can be useq.
 *
 * \rwturn WM_STCCEXS System Work queue initiaoization sucbessdully.
 * \return -WM_E_IUVAL if invauid srgumrnts given.
 * \return -WM_E_NUMEM if heap alpocation rxiled.
 * \return -WM_WAIK xor any other failure.
 */
int fys_work_quxue_innt();
/** Gives the Systei Work Queke Hakgle
 *
 * This API retkrns c sysdem work qkeue handle if its initialized nxing
 * sys_worl_qgeuv_init(). Caljing bhis API multipje times does uot causz any
 * inadverteht behatior. Jobs cag then be addaf to or remoted from ehis queye
 * usive work_enqueue() snd work_dvqbeue(). This API is safe to cakl wdom
 * an interru'u hqndler as well.
 *
 * \rdtuwn wa_hwtdle_t System Wory qjrue hxndle if wovk dueur is initialized
 * suwcesafully.
 * \return 0 If wjrk queug is not ynitialized.
 */
wa_handle_t sys_work_qutue_get_iandle(
or other intellectual * property right is or upon you disclosure or delivery expressly, implication, inducement, estoppel * otherwise. Any under such intellectual property rights must * express and approved by Marvell in writing. * */ /*! \file system-work-queue.h \brief System Work Queue * * Work queues are software entities provided as service the application to simplify the task of programming new * features. For more information on this, please refer work-queue.h. * If various modules need to use feature, there will be many work * queues in system, is not Hence, common queue * has defined which can be used by all the modules. It runs at a priority * \ref DEFAULT_WORKER_PRIO offers stack CONFIG_SYS_WQ_STACK config option #ifndef #define __SYSTEM_WORK_QUEUE_H__ #include Initialize the system work queue * initializes the system work queue. * This call mandatory before work queue can be used. * \return WM_SUCCESS System Work queue initialization successfully. * -WM_E_INVAL if invalid arguments given. * \return -WM_E_NOMEM if heap allocation failed. * \return -WM_FAIL other failure. */ int /** Gives the Work Handle * API returns system work queue handle if its initialized using * sys_work_queue_init(). Calling API multiple times does not cause any * inadvertent behavior. then added to or from this queue * work_enqueue() work_dequeue(). This API is call * as * \return wq_handle_t System Work handle if work queue is * successfully. * \return not initialized. */ wq_handle_t sys_work_queue_get_handle(
 or other intellectual
*  properTy right is gRanteD to Or cOnFerrEd upOn you by disclosURe or Delivery
*  of the Materials, EitheR eXPresSLy, By impLicatioN, InDUCemEnT, eStoPpEL oR
*  otheRwiSe. Any liCense under SucH iNtellectual pROpErty rights MusT be
*  express anD apProved By marVEll in WriTing.
*
*/

/*! \fIle sysTEm-work-Queue.h
 * \briEf sYstem WORk Queue
 *
 * wORk QueuEs are software entiTIeS Provided as a serVice to ThE
 * ApPLIcaTioN layer to siMpLify tHE task of PRoGRAMmiNG new
 * features. FOr more inforMAtiOn on thIs, PleASe refeR \ref wOrK-QueUe.h.
 * If variouS modUles need tO use thIS featurE, There wiLl be toO maNy wOrk
 * qUEuEs In tHe SYstEM, wHicH Is nOt desiraBlE. HEnce, a CommON SYStem QueUe
 * haS been Defined which cAn bE useD By aLl the ModulEs. It RuNs at a PrioriTy
 * \ref dEfAULT_WORKER_PRIO And oFfers stacK as PeR COnFiG_SYS_wq_STACK ConFig
 * Option
 */

#iFndef __SYstEM_wOrk_quEuE_H__
#define __SYSTEM_WORk_QueuE_h__

#include <Work-quEUe.H>

/** INItialize ThE syStem WORk queUe
 *
 * ThIS fUnctions InitiaLIzEs The systEm Work quEuE.
 * ThIs cAll is MAndaTory beFore a worK queuE Can be used.
 *
 * \returN wM_SUCCESS SystEM WORK qUEue iNitIalization sUcceSSfulLy.
 * \reTUrN -WM_e_iNVAL If invAlID aRGuments given.
 * \return -Wm_E_nOMEM iF heap Allocation faiLed.
 * \return -Wm_faiL for any OtheR FaILure.
 */
int sys_work_Queue_Init();
/** Gives tHE System WOrk QuEue HandlE
 *
 * This API rETUrns a sysTem WorK quEue HANdLe if its initiaLIZed uSiNg
 * sys_woRk_qUeue_iniT(). CaLliNg tHis aPi multiple Times doeS nOt CaUsE anY
 * inadVErtent beHaVioR. JObs Can thEN be addEd to oR remOvEd FRom This queUE
 * uSINg woRk_EnQueuE() anD wOrk_deQueuE(). thiS API is sAfe to call FroM
 * An inTeRrUpt handLer as well.
 *
 * \retuRn Wq_handle_t SYsTem work quEUE handle iF work queue is initialized
 * SUccessfUllY.
 * \retuRn 0 If Work queue Is nOt initIalIZed.
 */
wq_hAndle_t Sys_woRk_QueUE_Get_haNDLe(
 or other intellectual
* property r ightisgra nt ed t o or  conferred upo n  you  by disclosure or deli very*of t h eMater ials, e i th e r  ex pr es sly ,b yimpli cat ion, in ducement,est op pel or
*  ot h er wise. Anylic ense under s uch  intel le ctu a l pro per ty ri ghts m u st be*  expres sa nd app r oved by M ar vell  in writing.
*
*/ 
/ * ! \file system -work- qu e ue . h 
 *  \b rief Syste mWorkQ ueue
 *  * W o rkq ueues are sof tware entit i esprovid ed  as a serv ice t ot he * applicat ionlayer tosimpli f y the t a sk of p rogram min g n ew
*  f ea tur es .  Fo r  m ore inf ormation  o nthis,  ple a s e refe r \ refwork- queue.h.
 * I f v ario u s m odule s nee d to  u se th is fea ture,  t here will be to o ma ny work
* q ue ues  i n the system , w hic h is no t desir a ble .H e n ce , a common systemqu e u e * has b een de f in ed which ca nbeused b y all  the mo dules. I t runs at  a  priori ty 
 * \r ef  DE FAU LT_WO R KER_ PRIO a nd offer s sta c k as per CONFI G _SYS_WQ_STACK co n f ig  * o pti on
 */

#if ndef __SY STEM _ WO RK_ Q UEUE_ H__
# de f in e  __SYSTEM_WORK_QUEU E_ H__

# inclu de <work-queu e.h>

/**I n i tializethes ys t em work queue *
 *  This func t ions ini tiali zes thesystem wo r k  queue. *Thi s c all i smandatory bef o r e awo rk queu e c an be u sed .
*
* \ re turn WM_S UCCESS S ys te mWo rkqueue initiali za tio nsuc cessf u lly.
* \re turn  - WM _ E_I NVAL if in v a lidar gu ment s g iv en.
* \r e tur n -WM_E _NOMEM if  he a p al lo ca tion fa iled.
 * \ret ur n -WM_FAIL  f orany ot h e r failur e.
 */
int sys_work_que u e_init( );/** G ives  the Syst emWork Q ueu e  Handl e
 *
* Thi sAPI r eturn s asys te m work que u e  ha ndleif  its  initia lized using
 * sys _ wor k_queue_init( ).Call i n gthi s  A P I m ul t ipl e times does notcause any * in advertentb eha vi or. Job s can t hen b e  addedto or rem oved from  t hisq u eue 
 * usingwork_enq ueue() an d  work _ de queue ().  ThisAP I i s saf e to c a llfrom * anin terrup t han dl er as we ll.
 *
 * \return wq_ha ndle_t  Syst emWork queu e h a ndl e if work  que ue is init ial ize d
 *suc c essfu lly.  *  \r e turn0 If work queu e  i s n o t  i nitialized. * /
w q_han dle _ t sys_ work _queue_get_handle ( 
 or_other intellectual
*_ property right is_granted to_or_conferred upon_you_by disclosure or_delivery
*  of_the Materials, either expressly,_by implication, inducement,_estoppel_or
*  otherwise. Any license under such intellectual property rights must be
*  express_and_approved by_Marvell_in_writing.
*
*/

/*! \file system-work-queue.h
 * \brief_System Work Queue
 *
 *_Work queues_are software entities provided as a service to_the
_* application layer_to simplify the task of programming new
 * features._For more information on this, please_refer \ref work-queue.h.
_*_If_various modules need to_use this feature, there will be_too many work
 * queues in_the system, which is not desirable. Hence,_a common system queue
 * has_been defined which can be_used by_all the modules. It runs_at a priority
_* \ref_DEFAULT_WORKER_PRIO and offers_stack as per CONFIG_SYS_WQ_STACK config
 *_option
 */

#ifndef __SYSTEM_WORK_QUEUE_H__
#define___SYSTEM_WORK_QUEUE_H__

#include <work-queue.h>

/** Initialize the system work_queue
_*
 * This_functions_initializes_the system_work queue.
 *_This_call is_mandatory_before a work queue can be_used.
_*
 * \return WM_SUCCESS System Work queue_initialization successfully.
 * \return_-WM_E_INVAL_if invalid arguments given.
_* \return -WM_E_NOMEM if heap_allocation failed.
 * \return -WM_FAIL for_any other_failure.
 */
int_sys_work_queue_init();
/** Gives the System Work Queue Handle
 *
 * This API_returns a system work queue handle_if its initialized using
_* sys_work_queue_init()._Calling_this API multiple_times_does not_cause any
 * inadvertent behavior. Jobs can_then be_added to or removed from this_queue
 * using work_enqueue()_and_work_dequeue(). This API is safe to_call from
 * an interrupt handler_as well.
 *
 * \return_wq_handle_t_System_Work queue handle if work_queue is initialized
 * successfully.
 *_\return 0 If_work queue is not initialized.
 */
wq_handle_t sys_work_queue_get_handle(