diff options
author | Brad King <brad.king@kitware.com> | 2019-01-21 12:54:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-21 12:54:45 (GMT) |
commit | 55a2dc3055e8c5f2189c763eb3fd4c9c754d1c05 (patch) | |
tree | 9b7c691309d0a0eb52acbd32d5357e038552376c /Utilities/cmlibuv/src/unix/openbsd.c | |
parent | eadaf0c8c3b4112d38a19b20a9d303e83640373d (diff) | |
parent | 5b3af28e4532eadf92dee229870cadc94be9c635 (diff) | |
download | CMake-55a2dc3055e8c5f2189c763eb3fd4c9c754d1c05.zip CMake-55a2dc3055e8c5f2189c763eb3fd4c9c754d1c05.tar.gz CMake-55a2dc3055e8c5f2189c763eb3fd4c9c754d1c05.tar.bz2 |
Merge topic 'update-libuv'
5b3af28e45 libuv: Update CMake-internal buildsystem
1136275ae1 libuv: Include uv/ headers from each other without any path
1e1209729b Merge branch 'upstream-libuv' into update-libuv
4fcb0d0213 libuv 2019-01-15 (f84c5e69)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2822
Diffstat (limited to 'Utilities/cmlibuv/src/unix/openbsd.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/openbsd.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/Utilities/cmlibuv/src/unix/openbsd.c b/Utilities/cmlibuv/src/unix/openbsd.c index ce937cd..bffb58b 100644 --- a/Utilities/cmlibuv/src/unix/openbsd.c +++ b/Utilities/cmlibuv/src/unix/openbsd.c @@ -36,16 +36,6 @@ #include <unistd.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); } @@ -146,65 +136,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) { struct kinfo_proc kinfo; size_t page_size = getpagesize(); |