ESP32 Dual Core Question

Hi - I have a question which may be stupid, but this is my first time assigning tasks.

I've read this tutorial here, which makes it look quite easy, but there's something they don't cover: if it's possible to call other functions from within the core assignment function.

For instance, if I have 4 different functions outside of setup/loop and I want to designate two per core:

void function1() {
// stuff for core0
}

void function2() {
// stuff for core0
}

void function3() {
// stuff for core1
}

void function4() {
// stuff for core1
}

And then I have a couple tasks like this:

void Task1code( void * pvParameters ){

// specified to run on core0 in setup

  for(;;){

function1();
function2();

  }
}

void Task2code( void * pvParameters ){

// specified to run on core1 in setup

  for(;;){

function3();
function4();

  }
}

Would I be able to run functions like that that are dedicated to their respective tasks' cores?

Never mind, I did some experimenting and got my answers. For anyone else wondering the same, you can run outside functions in your assigned core void. I noticed that if and while statements placed directly in the core assigned void cause the whole thing to reset (something about unresponsiveness) - but if you place all of them in an outside function and just reference that from within the core task loop, it works perfectly:

TaskHandle_t Task1;
TaskHandle_t Task2;



void setup() {
  Serial.begin(115200);

  //create a task that will be executed in the Task1code() function, with priority 1 and executed on core 0
  xTaskCreatePinnedToCore(
                    Task1code,   /* Task function. */
                    "Task1",     /* name of task. */
                    10000,       /* Stack size of task */
                    NULL,        /* parameter of the task */
                    1,           /* priority of the task */
                    &Task1,      /* Task handle to keep track of created task */
                    0);          /* pin task to core 0 */                  
  delay(500); 

  //create a task that will be executed in the Task2code() function, with priority 1 and executed on core 1
  xTaskCreatePinnedToCore(
                    Task2code,   /* Task function. */
                    "Task2",     /* name of task. */
                    10000,       /* Stack size of task */
                    NULL,        /* parameter of the task */
                    1,           /* priority of the task */
                    &Task2,      /* Task handle to keep track of created task */
                    1);          /* pin task to core 1 */
    delay(500); 
}

bool variable = false;

void outerTask() {
  while (variable == true) {
      Serial.println("running task 1");
      delay(1000);
      variable = false;
  }
}

void Task1code( void * pvParameters ){
  Serial.print("Task1 running on core ");
  Serial.println(xPortGetCoreID());

  for(;;){
    // while (variable == true) {
    outerTask();
      // } //while
  } 
}

//Task2code: blinks an LED every 700 ms
void Task2code( void * pvParameters ){
  Serial.print("Task2 running on core ");
  Serial.println(xPortGetCoreID());

  for(;;){
      Serial.println("running task 2");
      delay(4000);
      variable = true;
  }
}

void loop() {
  
}

Yep, those voids can be tricky to navigate.