A4MCAR - Updates regarding making thread names visible to the linux kernel in Python
Signed-off-by: Mustafa Ozcelikors <mozcelikors@gmail.com>
diff --git a/a4mcar/high_level_applications/apps/touchscreen_display/touchscreen_display.py b/a4mcar/high_level_applications/apps/touchscreen_display/touchscreen_display.py
index e4462bc..e584f71 100644
--- a/a4mcar/high_level_applications/apps/touchscreen_display/touchscreen_display.py
+++ b/a4mcar/high_level_applications/apps/touchscreen_display/touchscreen_display.py
@@ -38,6 +38,7 @@
import netinfo #How Pynetinfo package imported. To install run pip install X.tar.gz to package, first.
import re #regex for ssid, psk retrieval
import psutil
+import prctl
#Virtual Keyboard related definitions
mykeys = virtkeyboard.VirtualKeyboard()
@@ -1116,6 +1117,7 @@
aprocess_list.append(this_thread)
lock_aprocess_list.release() #----
aprocess_list_len = len(aprocess_list)
+ prctl.set_name("Thread_TimingCalculation")
while True:
@@ -1223,6 +1225,7 @@
aprocess_list.append(this_thread)
lock_aprocess_list.release() #----
aprocess_list_len = len(aprocess_list)
+ prctl.set_name("Thread_TouchscreenEvents")
while True:
#Timing Related
@@ -1384,6 +1387,7 @@
aprocess_list.append(this_thread)
lock_aprocess_list.release() #----
aprocess_list_len = len(aprocess_list)
+ prctl.set_name("Thread_UpdateCoreUsageInfo")
while True:
#Timing Related
diff --git a/a4mcar/high_level_applications/setup_high_level_applications.sh b/a4mcar/high_level_applications/setup_high_level_applications.sh
index b2209a7..c0b1f8d 100644
--- a/a4mcar/high_level_applications/setup_high_level_applications.sh
+++ b/a4mcar/high_level_applications/setup_high_level_applications.sh
@@ -58,6 +58,9 @@
echo "### Clearing downloaded files..."
sudo rm -rf ~/Downloads/a4mcar_required_modules/
+echo "### Installing prctl"
+sudo apt-get install python-prctl
+
echo "### Making all python scripts executable"
sudo chmod +x $DIR/apps/touchscreen_display/touchscreen_display.py
sudo chmod +x $DIR/apps/ethernet_client/ethernet_client.py