<commit_before>#include "test.h"

static_BOX(box3, 1, sizeof(unsigned));

static unsigned sent;

static void proc3()
{
	unsigned received;
	unsigned event;

 	event = box_wait(box3, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box2, &received);           assert_success(event);
	        tsk_stop();
}

static void proc2()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk3);
	        tsk_startFrom(tsk3, proc3);
 	event = box_wait(box2, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box3, &received);           assert_success(event);
 	event = box_wait(box2, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box1, &received);           assert_success(event);
	event = tsk_join(tsk3);                      assert_success(event);
	        tsk_stop();
}

static void proc1()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk2);
	        tsk_startFrom(tsk2, proc2);
 	event = box_wait(box1, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box2, &received);           assert_success(event);
 	event = box_wait(box1, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(&box0, &received);          assert_success(event);
	event = tsk_join(tsk2);                      assert_success(event);
	        tsk_stop();
}

static void proc0()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk1);
	        tsk_startFrom(tsk1, proc1);
	        sent = rand();
	event = box_give(box1, &sent);               assert_success(event);
 	event = box_wait(&box0, &received);          assert_success(event);
 	                                             assert(received == sent);
	event = tsk_join(tsk1);                      assert_success(event);
	        tsk_stop();
}

static void test()
{
	unsigned event;
		                                         assert_dead(&tsk0);
	        tsk_startFrom(&tsk0, proc0);
	event = tsk_join(&tsk0);                     assert_success(event);
}

void test_mailbox_queue_1()
{
	TEST_Notify();
	TEST_Call();
}<commit_msg>Update test_mailbox_queue_1.c<commit_after>#include "test.h"

static_BOX(box3, 1, sizeof(unsigned));

static unsigned sent;

static void proc3()
{
	unsigned received;
	unsigned event;

 	event = box_wait(box3, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box2, &received);           assert_success(event);
	        tsk_stop();
}

static void proc2()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk3);
	        tsk_startFrom(tsk3, proc3);          assert_ready(tsk3);
 	event = box_wait(box2, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box3, &received);           assert_success(event);
 	event = box_wait(box2, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box1, &received);           assert_success(event);
	event = tsk_join(tsk3);                      assert_success(event);
	        tsk_stop();
}

static void proc1()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk2);
	        tsk_startFrom(tsk2, proc2);          assert_ready(tsk2);
 	event = box_wait(box1, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box2, &received);           assert_success(event);
 	event = box_wait(box1, &received);           assert_success(event);
 	                                             assert(received == sent);
	event = box_give(&box0, &received);          assert_success(event);
	event = tsk_join(tsk2);                      assert_success(event);
	        tsk_stop();
}

static void proc0()
{
	unsigned received;
	unsigned event;
		                                         assert_dead(tsk1);
	        tsk_startFrom(tsk1, proc1);          assert_ready(tsk1);
 	event = box_wait(&box0, &received);          assert_success(event);
 	                                             assert(received == sent);
	event = box_give(box1, &received);           assert_success(event);
 	event = box_wait(&box0, &received);          assert_success(event);
 	                                             assert(received == sent);
	event = tsk_join(tsk1);                      assert_success(event);
	        tsk_stop();
}

static void test()
{
	unsigned event;
		                                         assert_dead(&tsk0);
	        tsk_startFrom(&tsk0, proc0);         assert_ready(&tsk0);
	        tsk_yield();
	        tsk_yield();
	        sent = rand();
	event = box_give(&box0, &sent);              assert_success(event);
	event = tsk_join(&tsk0);                     assert_success(event);
}

void test_mailbox_queue_1()
{
	TEST_Notify();
	TEST_Call();
}
{'fraction_non_alphanumeric': 0.10764401772525849, 'fraction_numerical': 0.014217134416543575, 'mean_word_length': 1.6463116756228626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2394054', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1455, 'n_words': 287}