Loading libcutils/Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,6 @@ commonSources := \ strdup16to8.c \ strdup16to8.c \ strdup8to16.c \ strdup8to16.c \ process_name.c \ process_name.c \ properties.c \ threads.c \ threads.c \ sched_policy.c \ sched_policy.c \ iosched_policy.c \ iosched_policy.c \ Loading Loading @@ -112,6 +111,7 @@ LOCAL_SRC_FILES := $(commonSources) \ debugger.c \ debugger.c \ klog.c \ klog.c \ partition_utils.c \ partition_utils.c \ properties.c \ qtaguid.c \ qtaguid.c \ trace.c \ trace.c \ uevent.c uevent.c Loading libcutils/process_name.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,9 @@ #include <stdlib.h> #include <stdlib.h> #include <string.h> #include <string.h> #include <cutils/process_name.h> #include <cutils/process_name.h> #ifdef HAVE_ANDROID_OS #include <cutils/properties.h> #include <cutils/properties.h> #endif #include <unistd.h> #include <unistd.h> #include <sys/types.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/stat.h> Loading @@ -33,7 +35,9 @@ static const char* process_name = "unknown"; static int running_in_emulator = -1; static int running_in_emulator = -1; void set_process_name(const char* new_name) { void set_process_name(const char* new_name) { #ifdef HAVE_ANDROID_OS char propBuf[PROPERTY_VALUE_MAX]; char propBuf[PROPERTY_VALUE_MAX]; #endif if (new_name == NULL) { if (new_name == NULL) { return; return; Loading @@ -53,6 +57,7 @@ void set_process_name(const char* new_name) { } } #endif #endif #ifdef HAVE_ANDROID_OS // If we know we are not running in the emulator, then return. // If we know we are not running in the emulator, then return. if (running_in_emulator == 0) { if (running_in_emulator == 0) { return; return; Loading Loading @@ -82,6 +87,7 @@ void set_process_name(const char* new_name) { return; return; write(fd, process_name, strlen(process_name) + 1); write(fd, process_name, strlen(process_name) + 1); close(fd); close(fd); #endif } } const char* get_process_name(void) { const char* get_process_name(void) { Loading Loading
libcutils/Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,6 @@ commonSources := \ strdup16to8.c \ strdup16to8.c \ strdup8to16.c \ strdup8to16.c \ process_name.c \ process_name.c \ properties.c \ threads.c \ threads.c \ sched_policy.c \ sched_policy.c \ iosched_policy.c \ iosched_policy.c \ Loading Loading @@ -112,6 +111,7 @@ LOCAL_SRC_FILES := $(commonSources) \ debugger.c \ debugger.c \ klog.c \ klog.c \ partition_utils.c \ partition_utils.c \ properties.c \ qtaguid.c \ qtaguid.c \ trace.c \ trace.c \ uevent.c uevent.c Loading
libcutils/process_name.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,9 @@ #include <stdlib.h> #include <stdlib.h> #include <string.h> #include <string.h> #include <cutils/process_name.h> #include <cutils/process_name.h> #ifdef HAVE_ANDROID_OS #include <cutils/properties.h> #include <cutils/properties.h> #endif #include <unistd.h> #include <unistd.h> #include <sys/types.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/stat.h> Loading @@ -33,7 +35,9 @@ static const char* process_name = "unknown"; static int running_in_emulator = -1; static int running_in_emulator = -1; void set_process_name(const char* new_name) { void set_process_name(const char* new_name) { #ifdef HAVE_ANDROID_OS char propBuf[PROPERTY_VALUE_MAX]; char propBuf[PROPERTY_VALUE_MAX]; #endif if (new_name == NULL) { if (new_name == NULL) { return; return; Loading @@ -53,6 +57,7 @@ void set_process_name(const char* new_name) { } } #endif #endif #ifdef HAVE_ANDROID_OS // If we know we are not running in the emulator, then return. // If we know we are not running in the emulator, then return. if (running_in_emulator == 0) { if (running_in_emulator == 0) { return; return; Loading Loading @@ -82,6 +87,7 @@ void set_process_name(const char* new_name) { return; return; write(fd, process_name, strlen(process_name) + 1); write(fd, process_name, strlen(process_name) + 1); close(fd); close(fd); #endif } } const char* get_process_name(void) { const char* get_process_name(void) { Loading