Added stubs for get/setrlimit().

This commit is contained in:
max99x 2011-09-13 01:31:36 +03:00
Родитель 5e8f0c1ca7
Коммит 2349a6254c
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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!)