TrueBitFoundation / ocaml-offchain

Fork of WebAssembly reference interpreter with support for generating proofs needed for blockchain verification
Apache License 2.0
44 stars 10 forks source link

System calls: simple stubs #50

Open mrsmkl opened 6 years ago

mrsmkl commented 6 years ago

The following system calls just need simple stubs. They could be handled using the generic system calls, but it will be more efficient to add stubs.

  1. Pause:nothing to implement
  2. Nice: nothing to implement
  3. Sync: nothing to implement
  4. Pipe: nothing to implement
  5. Acct: nothing to implement, but what is it?
  6. Setsid: nothing to implement
  7. Setrlimit: nothing to implement
  8. Getpriority: nothing to implement
  9. Setpriority: nothing to implement
  10. Setitimer: nothing to implement
  11. Wait4: nothing to implement
  12. Fsync: nothing to implement?
  13. setdomainname: nothing to implement
  14. Mprotect: nothing to implement
  15. Fdatasync: Nothing
  16. Mlock: nothing
  17. Munlock: nothing
  18. Mlockall: nothing
  19. Munlockall: nothing
  20. Mremap: nothing 199, 200, 201, 202: getuid32, getgid32, geteuid32, getgid32: nothing 203, 204, 213, 214. Setreuid32, setregid32, setuid32, getuid32: nothing
  21. Mincore: nothing
  22. Madvise: nothing
  23. Clock_nanosleep: nothing
  24. Fadvise64: nothing
  25. Futimesat: nothing
  26. Linkat: nothing
  27. Pselect: nothing
  28. Pipe2: nothing
terminaldweller commented 6 years ago

how do you want them stubbed?

mrsmkl commented 6 years ago

So that they work like in https://github.com/kripken/emscripten/blob/master/src/library_syscall.js Mostly this means that they will just return some constant value.