diff options
author | max99x <max99x@gmail.com> | 2011-09-13 01:31:36 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-09-13 01:31:36 +0300 |
commit | 2349a6254c3b013b854cbb7930b272ad5c131511 (patch) | |
tree | 0985c17e860e764fcf09ece7b0ebcb9f96ba6b46 | |
parent | 5e8f0c1ca72935e4f23edbb277f986e2742a0ced (diff) |
Added stubs for get/setrlimit().
-rw-r--r-- | src/library.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index e5fe63f5..776183b0 100644 --- a/src/library.js +++ b/src/library.js @@ -5185,6 +5185,24 @@ LibraryManager.library = { __errno_location: function() { return ___setErrNo.ret; }, + // ========================================================================== + // sys/resource.h + // ========================================================================== + + // TODO: Implement for real. + __rlimit_struct_layout: Runtime.generateStructInfo(null, '%struct.rlimit'), + getrlimit__deps: ['__rlimit_struct_layout'], + getrlimit: function(resource, rlp) { + // int getrlimit(int resource, struct rlimit *rlp); + {{{ makeSetValue('rlp', '___rlimit_struct_layout.rlim_cur', '-1', 'i32') }}} // RLIM_INFINITY + {{{ makeSetValue('rlp', '___rlimit_struct_layout.rlim_max', '-1', 'i32') }}} // RLIM_INFINITY + return 0; + }, + setrlimit: function(resource, rlp) { + // int setrlimit(int resource, const struct rlimit *rlp) + return 0; + }, + __01getrlimit64_: 'getrlimit', // ========================================================================== // pthread.h (stubs for mutexes only - no thread support yet!) |