From 9cef7b84b1f6b1e116afaad945f31b368e8917e2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 12 Nov 2018 23:59:52 -0500 Subject: deps: upgrade to libuv 1.24.0 PR-URL: https://github.com/nodejs/node/pull/24332 Reviewed-By: Refael Ackermann Reviewed-By: Santiago Gimeno Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat --- deps/uv/src/unix/netbsd.c | 68 ----------------------------------------------- 1 file changed, 68 deletions(-) (limited to 'deps/uv/src/unix/netbsd.c') diff --git a/deps/uv/src/unix/netbsd.c b/deps/uv/src/unix/netbsd.c index 2605c114bc..4cfde1a586 100644 --- a/deps/uv/src/unix/netbsd.c +++ b/deps/uv/src/unix/netbsd.c @@ -40,15 +40,6 @@ #include #include -static uv_mutex_t process_title_mutex; -static uv_once_t process_title_mutex_once = UV_ONCE_INIT; -static char *process_title; - - -static void init_process_title_mutex_once(void) { - uv_mutex_init(&process_title_mutex); -} - int uv__platform_loop_init(uv_loop_t* loop) { return uv__kqueue_init(loop); @@ -134,65 +125,6 @@ uint64_t uv_get_total_memory(void) { } -char** uv_setup_args(int argc, char** argv) { - process_title = argc ? uv__strdup(argv[0]) : NULL; - return argv; -} - - -int uv_set_process_title(const char* title) { - char* new_title; - - new_title = uv__strdup(title); - - uv_once(&process_title_mutex_once, init_process_title_mutex_once); - uv_mutex_lock(&process_title_mutex); - - if (process_title == NULL) { - uv_mutex_unlock(&process_title_mutex); - return UV_ENOMEM; - } - - uv__free(process_title); - process_title = new_title; - setproctitle("%s", title); - - uv_mutex_unlock(&process_title_mutex); - - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - size_t len; - - if (buffer == NULL || size == 0) - return UV_EINVAL; - - uv_once(&process_title_mutex_once, init_process_title_mutex_once); - uv_mutex_lock(&process_title_mutex); - - if (process_title) { - len = strlen(process_title) + 1; - - if (size < len) { - uv_mutex_unlock(&process_title_mutex); - return UV_ENOBUFS; - } - - memcpy(buffer, process_title, len); - } else { - len = 0; - } - - uv_mutex_unlock(&process_title_mutex); - - buffer[len] = '\0'; - - return 0; -} - - int uv_resident_set_memory(size_t* rss) { kvm_t *kd = NULL; struct kinfo_proc2 *kinfo = NULL; -- cgit v1.2.3