Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c109d91 authored by Zach Johnson's avatar Zach Johnson
Browse files

btu_task_shut_down -> main_thread_shut_down

pull out unrelated code into stack manager

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4c3ad4ff51cbc0b0240a824bb9be749aa5810e1b
parent 527ae41e
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -69,7 +69,8 @@
#include "btif/include/btif_sock.h"
#include "main/shim/controller.h"

void btu_task_shut_down();
void main_thread_shut_down();
void main_thread_start_up();
void BTA_dm_on_hw_on();
void BTA_dm_on_hw_off();

@@ -91,8 +92,6 @@ static void event_clean_up_stack(void* context);
static void event_signal_stack_up(void* context);
static void event_signal_stack_down(void* context);

void main_thread_start_up();

// Unvetted includes/imports, etc which should be removed or vetted in the
// future
static future_t* hack_future;
@@ -296,7 +295,11 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
    module_shut_down(get_module(BTSNOOP_MODULE));
  }

  btu_task_shut_down();
  main_thread_shut_down();

  module_clean_up(get_module(BTE_LOGMSG_MODULE));

  btu_free_core();

  module_shut_down(get_module(CONTROLLER_MODULE));  // Doesn't do any work, just
                                                    // puts it in a restartable
+1 −8
Original line number Diff line number Diff line
@@ -118,11 +118,4 @@ void main_thread_start_up() {
  }
}

void btu_task_shut_down() {
  // Shutdown message loop on task completed
  main_thread.ShutDown();

  module_clean_up(get_module(BTE_LOGMSG_MODULE));

  btu_free_core();
}
void main_thread_shut_down() { main_thread.ShutDown(); }