From 681a50640ea51916846467bb76181dfc32193ce1 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 17 Aug 2020 07:31:53 +0800 Subject: [PATCH] init and destroy transform_lock (#2003) old-commit-hash: 36801a70eb8f599baee8e07aed0ec9c3b6385595 --- selfdrive/modeld/modeld.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfdrive/modeld/modeld.cc b/selfdrive/modeld/modeld.cc index 33dafc86cf..65b702dbd2 100644 --- a/selfdrive/modeld/modeld.cc +++ b/selfdrive/modeld/modeld.cc @@ -78,6 +78,8 @@ int main(int argc, char **argv) { signal(SIGINT, (sighandler_t)set_do_exit); signal(SIGTERM, (sighandler_t)set_do_exit); + pthread_mutex_init(&transform_lock, NULL); + // start calibration thread pthread_t live_thread_handle; err = pthread_create(&live_thread_handle, NULL, live_thread, NULL); @@ -249,5 +251,6 @@ int main(int argc, char **argv) { clReleaseCommandQueue(q); clReleaseContext(context); + pthread_mutex_destroy(&transform_lock); return 0; }