db_mutex.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Copyright (C) 2014 Stony Brook University
  2. This file is part of Graphene Library OS.
  3. Graphene Library OS is free software: you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public License
  5. as published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. Graphene Library OS is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /*
  14. * db_mutex.c
  15. */
  16. #include "api.h"
  17. #include "pal.h"
  18. #include "pal_defs.h"
  19. #include "pal_error.h"
  20. #include "pal_internal.h"
  21. int
  22. _DkMutexCreate (PAL_HANDLE * handle, int initialCount)
  23. {
  24. return -PAL_ERROR_NOTIMPLEMENTED;
  25. }
  26. int _DkMutexLockTimeout (struct mutex_handle * m, int64_t timeout_us)
  27. {
  28. return -PAL_ERROR_NOTIMPLEMENTED;
  29. }
  30. int _DkMutexLock (struct mutex_handle * m)
  31. {
  32. return -PAL_ERROR_NOTIMPLEMENTED;
  33. }
  34. int _DkMutexAcquireTimeout (PAL_HANDLE handle, int64_t timeout_us)
  35. {
  36. return -PAL_ERROR_NOTIMPLEMENTED;
  37. }
  38. int _DkMutexUnlock (struct mutex_handle * m)
  39. {
  40. return -PAL_ERROR_NOTIMPLEMENTED;
  41. }
  42. void _DkMutexRelease (PAL_HANDLE handle)
  43. {
  44. /* Not implemented yet */
  45. }
  46. static int mutex_wait (PAL_HANDLE handle, int64_t timeout_us)
  47. {
  48. return -PAL_ERROR_NOTIMPLEMENTED;
  49. }
  50. struct handle_ops mutex_ops = {
  51. .wait = &mutex_wait,
  52. };