db_threading.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. /* Copyright (C) 2014 OSCAR lab, Stony Brook University
  4. This file is part of Graphene Library OS.
  5. Graphene Library OS is free software: you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation, either version 3 of the
  8. License, or (at your option) any later version.
  9. Graphene Library OS 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, see <http://www.gnu.org/licenses/>. */
  15. /*
  16. * db_threading.c
  17. *
  18. * This file contain APIs to create, exit and yield a thread.
  19. */
  20. #include "pal_defs.h"
  21. #include "pal.h"
  22. #include "pal_internal.h"
  23. #include "pal_error.h"
  24. #include "pal_debug.h"
  25. #include "api.h"
  26. /* _DkThreadCreate for internal use. Create an internal thread
  27. inside the current process. The arguments callback and param
  28. specify the starting function and parameters */
  29. int _DkThreadCreate (PAL_HANDLE * handle, int (*callback) (void *),
  30. const void * param, int flags)
  31. {
  32. return -PAL_ERROR_NOTIMPLEMENTED;
  33. }
  34. /* PAL call DkThreadPrivate: set up the thread private area for the
  35. current thread. if addr is 0, return the current thread private
  36. area. */
  37. void * _DkThreadPrivate (void * addr)
  38. {
  39. return -PAL_ERROR_NOTIMPLEMENTED;
  40. }
  41. int _DkThreadDelayExecution (unsigned long * duration)
  42. {
  43. return -PAL_ERROR_NOTIMPLEMENTED;
  44. }
  45. /* PAL call DkThreadYieldExecution. Yield the execution
  46. of the current thread. */
  47. void _DkThreadYieldExecution (void)
  48. {
  49. }
  50. /* _DkThreadExit for internal use: Thread exiting */
  51. void _DkThreadExit (int exitcode)
  52. {
  53. }
  54. int _DkThreadResume (PAL_HANDLE threadHandle)
  55. {
  56. return -PAL_ERROR_NOTIMPLEMENTED;
  57. }
  58. struct handle_ops thread_ops = {
  59. /* nothing */
  60. };