<commit_before>#include "os/os.h"

#include <stdio.h>
#include <assert.h>


#define TASK1_PRIO (1) 
#define TASK2_PRIO (2) 
#define TASK3_PRIO (3)

struct os_task task1;
os_stack_t stack1[OS_STACK_ALIGN(1028)]; 

struct os_task task2;
os_stack_t stack2[OS_STACK_ALIGN(1028)];

struct os_task task3;
os_stack_t stack3[OS_STACK_ALIGN(1028)];


/* External functions */
int os_mempool_test(void);

struct os_eventq my_evq1;
struct os_eventq my_evq2;
struct os_eventq my_evq3;

#define OS_EVENT_T_STERLY (OS_EVENT_T_PERUSER) 

struct os_event my_osev1 = 
    OS_EVENT_INITIALIZER(my_osev1, OS_EVENT_T_STERLY, NULL);
struct os_event my_osev2 = 
    OS_EVENT_INITIALIZER(my_osev2, OS_EVENT_T_STERLY, NULL);


struct os_callout my_osc1 = 
    OS_CALLOUT_INITIALIZER(&my_osc1);


void 
task1_handler(void *arg)
{
    struct os_task *t; 
    struct os_event *ev;

    while (1) {
        t = os_sched_get_current_task();
        assert(t->t_func == task1_handler);

        os_time_delay(10);

        os_eventq_put(&my_evq2, &my_osev2);

        ev = os_eventq_get(&my_evq1); 
        switch (ev->ev_type) {
        case OS_EVENT_T_STERLY:
            printf("Pong!\n");
            fflush(stdout);
            os_eventq_put(&my_evq2, &my_osev2);
            break;
        default:
            assert(0);
        }
    }
}

void 
task2_handler(void *arg) 
{
    struct os_task *t;
    struct os_event *ev; 


    while (1) {
        t = os_sched_get_current_task();
        assert(t->t_func == task2_handler);
       
        os_time_delay(t, 10);

        os_eventq_put(&my_evq1, &my_osev1);<commit_msg>Update test project to include correct call to os_time_delay()<commit_after>#include "os/os.h"

#include <stdio.h>
#include <assert.h>


#define TASK1_PRIO (1) 
#define TASK2_PRIO (2) 
#define TASK3_PRIO (3)

struct os_task task1;
os_stack_t stack1[OS_STACK_ALIGN(1028)]; 

struct os_task task2;
os_stack_t stack2[OS_STACK_ALIGN(1028)];

struct os_task task3;
os_stack_t stack3[OS_STACK_ALIGN(1028)];


/* External functions */
int os_mempool_test(void);

struct os_eventq my_evq1;
struct os_eventq my_evq2;
struct os_eventq my_evq3;

#define OS_EVENT_T_STERLY (OS_EVENT_T_PERUSER) 

struct os_event my_osev1 = 
    OS_EVENT_INITIALIZER(my_osev1, OS_EVENT_T_STERLY, NULL);
struct os_event my_osev2 = 
    OS_EVENT_INITIALIZER(my_osev2, OS_EVENT_T_STERLY, NULL);


struct os_callout my_osc1 = 
    OS_CALLOUT_INITIALIZER(&my_osc1);


void 
task1_handler(void *arg)
{
    struct os_task *t; 
    struct os_event *ev;

    while (1) {
        t = os_sched_get_current_task();
        assert(t->t_func == task1_handler);

        os_time_delay(10);

        os_eventq_put(&my_evq2, &my_osev2);

        ev = os_eventq_get(&my_evq1); 
        switch (ev->ev_type) {
        case OS_EVENT_T_STERLY:
            printf("Pong!\n");
            fflush(stdout);
            os_eventq_put(&my_evq2, &my_osev2);
            break;
        default:
            assert(0);
        }
    }
}

void 
task2_handler(void *arg) 
{
    struct os_task *t;
    struct os_event *ev; 


    while (1) {
        t = os_sched_get_current_task();
        assert(t->t_func == task2_handler);
       
        os_time_delay(10);

        os_eventq_put(&my_evq1, &my_osev1);
{'fraction_non_alphanumeric': 0.10586419753086419, 'fraction_numerical': 0.03148148148148148, 'mean_word_length': 3.1445012787723785, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5684591', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1321, 'n_words': 230}