<commit_before>#include "ci20board.h"
#include "driver/jz47xx-uart/jz47xx-uart.h"
#include "driver/jz47xx-timer/jz47xx-timer.h"
#include "system/init.h"
#include "inttypes.h"
#include "ci20board.h"
#include "architecture/peekpoke.h"

volatile uint32_t counter = 0;

void counter_incrementer(void)
{
	//counter++;
}

void entrypoint(void)
{
	system_init();
	uart_puts("Hello, world!\r\n");

	// ostimer_register_callback(counter_incrementer);

	for(int run = 0; run < 3; run++) {
		for(volatile uint32_t i = 0; i < 0xfffffff; i++)
			; 

		uart_print("%x4\r\n", counter);
	}

	while(1) {
		__asm__("wait");
	}
}


/* Potentially misleading name: this is the entrypoint for cores OTHER THAN
 * CORE 0, which have been started by core 0 during the kernel initialisation
 * process. */
void multicore_entrypoint(void)
{
	uart_puts("Hello, multicore world!\r\n");

	while(1) {
		counter++;
	}

	/*
	while(1) {
		__asm__("wait");
	}
	*/
}
<commit_msg>Add both-cores busy loop print<commit_after>#include "ci20board.h"
#include "driver/jz47xx-uart/jz47xx-uart.h"
#include "driver/jz47xx-timer/jz47xx-timer.h"
#include "system/init.h"
#include "inttypes.h"
#include "ci20board.h"
#include "architecture/peekpoke.h"

volatile uint32_t counter = 0;

void counter_incrementer(void)
{
	counter++;
}

void entrypoint(void)
{
	system_init();
	uart_puts("Hello, world!\r\n");

	ostimer_register_callback(counter_incrementer);

	for(int run = 0; run < 10; run++) {
		for(volatile uint32_t i = 0; i < 0xfffffff; i++)
			; 

		uart_print("1: %x4\r\n", counter);
	}

	while(1) {
		__asm__("wait");
	}
}


/* Potentially misleading name: this is the entrypoint for cores OTHER THAN
 * CORE 0, which have been started by core 0 during the kernel initialisation
 * process. */
void multicore_entrypoint(void)
{
	uart_puts("Hello, multicore world!\r\n");

	for(int run = 0; run < 10; run++) {
		for(volatile uint32_t i = 0; i < 0xfffffff; i++)
			; 

		uart_print("2: %x4\r\n", counter);
	}

	while(1) {
		__asm__("wait");
	}
}

{'fraction_non_alphanumeric': 0.1596009975062344, 'fraction_numerical': 0.03192019950124688, 'mean_word_length': 4.2513089005235605, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6221522', 'n_tokens_mistral': 882, 'n_tokens_neox': 793, 'n_words': 175}