PageRenderTime 49ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/CUDK/OAL/Common/TI_OAL.cpp

http://github.com/CyanogenMod/cm-kernel
C++ | 112 lines | 35 code | 12 blank | 65 comment | 3 complexity | 6b8d2e5988a440c85f79cad184801156 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /*******************************************************************************
  2. **+--------------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/ |**
  5. **| |**
  6. **| Licensed under the Apache License, Version 2.0 (the "License"); |**
  7. **| you may not use this file except in compliance with the License. |**
  8. **| You may obtain a copy of the License at |**
  9. **| |**
  10. **| http://www.apache.org/licenses/LICENSE-2.0 |**
  11. **| |**
  12. **| Unless required by applicable law or agreed to in writing, software |**
  13. **| distributed under the License is distributed on an "AS IS" BASIS, |**
  14. **| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |**
  15. **| See the License for the specific language governing permissions and |**
  16. **| limitations under the License. |**
  17. **| |**
  18. **+--------------------------------------------------------------------------+**
  19. *******************************************************************************/
  20. // TIOsLib.cpp : Defines the entry point for the DLL application.
  21. //
  22. #include "CommonOAL.h"
  23. #ifdef _WINDOWS
  24. #endif //_WINDOWS
  25. //////////////////////////////////////////////////////////////////////
  26. // TI_OAL Class
  27. //////////////////////////////////////////////////////////////////////
  28. TI_OAL* TI_OAL::_instance = NULL;
  29. tiUINT32 TI_OAL::m_uReferenceCount= 0;
  30. //////////////////////////////////////////////////////////////////////
  31. // Construction/Destruction
  32. //////////////////////////////////////////////////////////////////////
  33. TI_OAL::TI_OAL()
  34. {
  35. }
  36. TI_OAL::~TI_OAL()
  37. {
  38. }
  39. TI_OSCriticalSection::TI_OSCriticalSection()
  40. {
  41. m_pWrapCS = TI_OSWrapCriticalSection::CreateObject();
  42. }
  43. TI_OSCriticalSection::~TI_OSCriticalSection()
  44. {
  45. if ( m_pWrapCS )
  46. {
  47. TI_OSWrapCriticalSection::DeleteObject(m_pWrapCS);
  48. m_pWrapCS = NULL;
  49. }
  50. }
  51. tiVOID
  52. TI_OSCriticalSection::Enter()
  53. {
  54. if ( m_pWrapCS )
  55. m_pWrapCS->Enter();
  56. }
  57. tiVOID
  58. TI_OSCriticalSection::Leave()
  59. {
  60. if ( m_pWrapCS )
  61. m_pWrapCS->Leave();
  62. }
  63. /*******************************************************************************************/
  64. /*******************************************************************************************/
  65. /*******************************************************************************************/
  66. /*
  67. TI_OSEvent::TI_OSEvent()
  68. {
  69. m_pWrapEvent = TI_OSWrapEvent::CreateObject();
  70. }
  71. TI_OSEvent::~TI_OSEvent()
  72. {
  73. if ( m_pWrapEvent )
  74. delete m_pWrapEvent;
  75. }
  76. tiVOID
  77. TI_OSEvent::Set()
  78. {
  79. if ( m_pWrapEvent )
  80. m_pWrapEvent->Set();
  81. }
  82. tiVOID
  83. TI_OSEvent::Reset()
  84. {
  85. if ( m_pWrapEvent )
  86. m_pWrapEvent->Reset();
  87. }
  88. tiUINT32
  89. TI_OSEvent::Wait(tiUINT32 uTime)
  90. {
  91. if ( !m_pWrapEvent )
  92. return TI_RESULT_FAILED;
  93. return m_pWrapEvent->Wait(uTime);
  94. }
  95. */