fci_oal.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*****************************************************************************
  2. Copyright(c) 2013 FCI Inc. All Rights Reserved
  3. File name : fci_oal.c
  4. Description : source of OS adaptation layer
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  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. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. History :
  17. ----------------------------------------------------------------------
  18. *******************************************************************************/
  19. #include <linux/kernel.h>
  20. #include <linux/delay.h>
  21. #include <linux/uaccess.h>
  22. #include "fci_types.h"
  23. void print_log(HANDLE handle, s8 *fmt, ...)
  24. {
  25. va_list ap;
  26. char str[256];
  27. memset(&str[0], 0, sizeof(str));
  28. va_start(ap, fmt);
  29. vsprintf(str, fmt, ap);
  30. printk(KERN_ERR"%s", str);
  31. va_end(ap);
  32. }
  33. void msWait(s32 ms)
  34. {
  35. mdelay(ms);
  36. }
  37. /* Write your own mutual exclusion method */
  38. void OAL_CREATE_SEMAPHORE(void)
  39. {
  40. /* called in driver initialization */
  41. }
  42. void OAL_DELETE_SEMAPHORE(void)
  43. {
  44. /* called in driver deinitializaton */
  45. }
  46. void OAL_OBTAIN_SEMAPHORE(void)
  47. {
  48. }
  49. void OAL_RELEASE_SEMAPHORE(void)
  50. {
  51. }