exfat_oal.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef _EXFAT_OAL_H
  19. #define _EXFAT_OAL_H
  20. #include "exfat_config.h"
  21. #include "exfat_global.h"
  22. #include <linux/version.h>
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. typedef struct {
  27. UINT16 sec;
  28. UINT16 min;
  29. UINT16 hour;
  30. UINT16 day;
  31. UINT16 mon;
  32. UINT16 year;
  33. } TIMESTAMP_T;
  34. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
  35. #define DECLARE_MUTEX(m) DEFINE_SEMAPHORE(m)
  36. #endif
  37. INT32 sm_init(struct semaphore *sm);
  38. INT32 sm_P(struct semaphore *sm);
  39. void sm_V(struct semaphore *sm);
  40. TIMESTAMP_T *tm_current(TIMESTAMP_T *tm, UINT8 tz_utc);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif