summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/netbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/src/unix/netbsd.c')
-rw-r--r--deps/uv/src/unix/netbsd.c68
1 files changed, 0 insertions, 68 deletions
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 <unistd.h>
#include <time.h>
-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;