aboutsummaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/freebsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/src/unix/freebsd.c')
-rw-r--r--deps/uv/src/unix/freebsd.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/deps/uv/src/unix/freebsd.c b/deps/uv/src/unix/freebsd.c
index 70ccb13042..0f729cfd47 100644
--- a/deps/uv/src/unix/freebsd.c
+++ b/deps/uv/src/unix/freebsd.c
@@ -47,15 +47,6 @@
# define CP_INTR 4
#endif
-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);
@@ -159,76 +150,6 @@ void uv_loadavg(double avg[3]) {
}
-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) {
- int oid[4];
- 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;
-
- oid[0] = CTL_KERN;
- oid[1] = KERN_PROC;
- oid[2] = KERN_PROC_ARGS;
- oid[3] = getpid();
-
- sysctl(oid,
- ARRAY_SIZE(oid),
- NULL,
- NULL,
- process_title,
- strlen(process_title) + 1);
-
- 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;