db_process.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_process.c
  15. *
  16. * This source file contains functions to create a child process and terminate
  17. * the running process. Child does not inherit any objects or memory from its
  18. * parent pricess. A Parent process may not modify the execution of its
  19. * children. It can wait for a child to exit using its handle. Also, parent and
  20. * child may communicate through I/O streams provided by the parent to the child
  21. * at creation.
  22. */
  23. #include "pal_defs.h"
  24. #include "pal.h"
  25. #include "pal_internal.h"
  26. #include "pal_debug.h"
  27. #include "pal_error.h"
  28. #include "api.h"
  29. int _DkProcessCreate (PAL_HANDLE * handle, const char * uri,
  30. int flags, const char ** args)
  31. {
  32. return -PAL_ERROR_NOTIMPLEMENTED;
  33. }
  34. noreturn void _DkProcessExit (int exitcode)
  35. {
  36. /* need to be implemented */
  37. }
  38. static int64_t proc_read (PAL_HANDLE handle, uint64_t offset, uint64_t count,
  39. void * buffer)
  40. {
  41. return -PAL_ERROR_NOTIMPLEMENTED;
  42. }
  43. static int64_t proc_write (PAL_HANDLE handle, uint64_t offset, uint64_t count,
  44. const void * buffer)
  45. {
  46. return -PAL_ERROR_NOTIMPLEMENTED;
  47. }
  48. static int proc_close (PAL_HANDLE handle)
  49. {
  50. return -PAL_ERROR_NOTIMPLEMENTED;
  51. }
  52. struct handle_ops proc_ops = {
  53. .read = &proc_read,
  54. .write = &proc_write,
  55. .close = &proc_close,
  56. };