MCPcopy
hub / github.com/jvilk/BrowserFS / ___syscall140

Function ___syscall140

test/tests/emscripten/readdir_empty.js:5558–5572  ·  view source on GitHub ↗
(which, varargs)

Source from the content-addressed store, hash-verified

5556 }
5557
5558 function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs;
5559 try {
5560 // llseek
5561 var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get();
5562 var offset = offset_low;
5563 assert(offset_high === 0);
5564 FS.llseek(stream, offset, whence);
5565 HEAP32[((result)>>2)]=stream.position;
5566 if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
5567 return 0;
5568 } catch (e) {
5569 if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
5570 return -e.errno;
5571 }
5572 }
5573
5574 function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs;
5575 try {

Callers 1

___stdio_seekFunction · 0.70

Calls 4

assertFunction · 0.70
abortFunction · 0.70
getMethod · 0.65
llseekMethod · 0.65

Tested by

no test coverage detected