PageRenderTime 51ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/CUDK/OAL/Pform/Linux/TILibLinux.h

http://github.com/CyanogenMod/cm-kernel
C Header | 79 lines | 31 code | 8 blank | 40 comment | 0 complexity | 2ce3bafdb4c5bd60a94d60b8214d100e 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. /* TILibLinux.h: interface for the CTI_LibLinux class.*/
  21. /**/
  22. /*////////////////////////////////////////////////////////////////////*/
  23. #if !defined(TI_LIB_LINUX_H_)
  24. #define TI_LIB_LINUX_H_
  25. class CTI_OSCriticalSectionLinux : public TI_OSWrapCriticalSection
  26. {
  27. public:
  28. CTI_OSCriticalSectionLinux();
  29. ~CTI_OSCriticalSectionLinux();
  30. tiVOID Enter ();
  31. tiVOID Leave ();
  32. };
  33. /*
  34. class CTI_OSEventLinux : public TI_OSWrapEvent
  35. {
  36. pthread_mutexattr_t m_MutexAttr;
  37. pthread_cond_t m_Cond;
  38. pthread_condattr_t m_CondAttr;
  39. tiBOOL m_bSet;
  40. public:
  41. CTI_OSEventLinux();
  42. ~CTI_OSEventLinux();
  43. tiUINT32 Wait (tiUINT32 uTime);
  44. tiVOID Set ();
  45. tiVOID Reset ();
  46. };
  47. */
  48. typedef tiVOID* (* uxTHREAD_START_ROUTINE)( tiVOID* pThreadParameter );
  49. class CTI_LibLinux: public TI_OAL
  50. {
  51. public:
  52. CTI_LibLinux ();
  53. virtual ~CTI_LibLinux ();
  54. static TI_OAL* GetInstance ();
  55. static tiVOID FreeInstance();
  56. /* list of functions that will call from Utility Adapter and Utility GUI modules */
  57. tiVOID TIOutputDebugString (tiCHAR* lpOutputString);
  58. tiBOOL TIIsBadWritePtr (tiVOID* lp, tiUINT32 ucb );
  59. /* list of functions that will call from Windows Utility module */
  60. tiUINT32 TILoadLibrary (tiCHAR* pLibFileName);
  61. tiBOOL TIFreeLibrary (tiUINT32 hLibModule);
  62. tiUINT32 TIGetProcAddress (tiUINT32 hModule, tiCHAR* lpProcName );
  63. tiUINT32 TIRegisterWindowMessage (tiCHAR* pszMsgName );
  64. tiBOOL TIPostMessage (tiUINT32 hWnd, tiUINT32 Msg, tiUINT32 wParam, tiUINT32 lParam);
  65. tiVOID TIPrintLastError (tiCHAR* psz);
  66. tiUINT32 TIGetCurrentThreadId();
  67. tiUINT32 TICreateThread (tiPTHREAD_START_ROUTINE pStartAddress, tiVOID* pParameter );
  68. tiVOID TISleep (tiUINT32 msec);
  69. };
  70. #endif /* !defined(TI_LIB_LINUX_H_)*/