<commit_before>#pragma once

#include <initializer_list.h>
#include <list.h>
#include <shared_ptr.h>
#include <kernel/cpu/gdt.h>

namespace scheduler {

class process {

public:

    enum class state {
        running,
        waiting,
        stopped,
        zombie
    };

    using pid_t = unsigned int;

    pid_t pid, ppid;
    cpu::gdt::tss context;
    void *stack;
    state stat = state::stopped;

};

extern utils::list<utils::shared_ptr<process>> processes;

void initialize();

} // namespace scheduler
<commit_msg>Add children and siblings list to the process class<commit_after>#pragma once

#include <initializer_list.h>
#include <list.h>
#include <kernel_list.h>
#include <shared_ptr.h>
#include <kernel/cpu/gdt.h>

namespace scheduler {

class process {

public:

    enum class state {
        running,
        waiting,
        stopped,
        zombie
    };

    using pid_t = unsigned int;

    pid_t pid, ppid;
    cpu::gdt::tss context;
    void *stack;
    state stat = state::stopped;
    utils::kernel_list<process> children;
    utils::kernel_list<process> siblings;

    process()
            : children(&process::children), siblings(&process::siblings) {
    }

};

extern utils::list<utils::shared_ptr<process>> processes;

void initialize();

} // namespace scheduler

{'fraction_non_alphanumeric': 0.12009237875288684, 'fraction_numerical': 0.0, 'mean_word_length': 3.1533546325878596, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '2943116', 'n_tokens_mistral': 425, 'n_tokens_neox': 423, 'n_words': 103}