diff options
author | cjihrig <cjihrig@gmail.com> | 2017-09-06 09:59:10 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-09-06 10:16:35 -0400 |
commit | 8485a7c0b71fd1dd36947a6dd02b75387805d9b7 (patch) | |
tree | 01394e3fce1af43e0153a9c5ef911ff127bad5eb /deps/uv/src/unix/os390.c | |
parent | 1403d28e7ded280e7582daa6e999164588d2234e (diff) | |
download | android-node-v8-8485a7c0b71fd1dd36947a6dd02b75387805d9b7.tar.gz android-node-v8-8485a7c0b71fd1dd36947a6dd02b75387805d9b7.tar.bz2 android-node-v8-8485a7c0b71fd1dd36947a6dd02b75387805d9b7.zip |
deps: upgrade libuv to 1.14.1
Fixes: https://github.com/nodejs/node/issues/12737
Fixes: https://github.com/nodejs/node/issues/13581
Fixes: https://github.com/nodejs/node/issues/15117
PR-URL: https://github.com/nodejs/node/pull/14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/os390.c')
-rw-r--r-- | deps/uv/src/unix/os390.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c index de7df91169..559970de2c 100644 --- a/deps/uv/src/unix/os390.c +++ b/deps/uv/src/unix/os390.c @@ -33,6 +33,7 @@ #endif #define CVT_PTR 0x10 +#define PSA_PTR 0x00 #define CSD_OFFSET 0x294 /* @@ -70,6 +71,18 @@ /* CPC model length from the CSRSI Service. */ #define CPCMODEL_LENGTH 16 +/* Pointer to the home (current) ASCB. */ +#define PSAAOLD 0x224 + +/* Pointer to rsm address space block extension. */ +#define ASCBRSME 0x16C + +/* + NUMBER OF FRAMES CURRENTLY IN USE BY THIS ADDRESS SPACE. + It does not include 2G frames. +*/ +#define RAXFMCT 0x2C + /* Thread Entry constants */ #define PGTH_CURRENT 1 #define PGTH_LEN 26 @@ -77,6 +90,9 @@ #pragma linkage(BPX4GTH, OS) #pragma linkage(BPX1GTH, OS) +/* TOD Clock resolution in nanoseconds */ +#define TOD_RES 4.096 + typedef unsigned data_area_ptr_assign_type; typedef union { @@ -122,7 +138,7 @@ uint64_t uv__hrtime(uv_clocktype_t type) { unsigned long long timestamp; __stckf(×tamp); /* Convert to nanoseconds */ - return timestamp / 10; + return timestamp / TOD_RES; } @@ -339,13 +355,17 @@ uint64_t uv_get_total_memory(void) { int uv_resident_set_memory(size_t* rss) { - W_PSPROC buf; + char* psa; + char* ascb; + char* rax; + size_t nframes; - memset(&buf, 0, sizeof(buf)); - if (w_getpsent(0, &buf, sizeof(W_PSPROC)) == -1) - return -EINVAL; + psa = PSA_PTR; + ascb = *(char* __ptr32 *)(psa + PSAAOLD); + rax = *(char* __ptr32 *)(ascb + ASCBRSME); + nframes = *(unsigned int*)(rax + RAXFMCT); - *rss = buf.ps_size; + *rss = nframes * sysconf(_SC_PAGESIZE); return 0; } @@ -747,9 +767,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { SAVE_ERRNO(uv__update_time(loop)); if (nfds == 0) { assert(timeout != -1); - timeout = real_timeout - timeout; - if (timeout > 0) + + if (timeout > 0) { + timeout = real_timeout - timeout; continue; + } return; } |