<commit_before>#include <fudge.h>
#include <kernel.h>
#include "system.h"

static struct vfs_backend backend;
static struct vfs_protocol protocol;

static unsigned int node_openmailboxes(struct system_node *self)
{

    struct task *task = task_findactive();

    if (!list_find(&self->mailboxes, &task->blockitem))
        list_add(&self->mailboxes, &task->blockitem);

    return (unsigned int)self;

}

static unsigned int node_closemailboxes(struct system_node *self)
{

    struct task *task = task_findactive();

    if (list_find(&self->mailboxes, &task->blockitem))
        list_remove(&self->mailboxes, &task->blockitem);

    return (unsigned int)self;

}

static unsigned int node_readgroup(struct system_node *self, unsigned int offset, unsigned int count, void *buffer)
{

    struct record *record = buffer;
    struct system_node *node = (offset) ? (struct system_node *)offset : self->parent;

    record->id = (unsigned int)node;
    record->size = 0;
    record->length = memory_read(record->name, RECORD_NAMESIZE, node->name, ascii_length(node->name), 0);

    if (node->type & SYSTEM_NODETYPE_MULTI)
    {

        char *index = ":0";

        index[1] = '0' + node->index;<commit_msg>Revert "make sure same process cant be added twice"<commit_after>#include <fudge.h>
#include <kernel.h>
#include "system.h"

static struct vfs_backend backend;
static struct vfs_protocol protocol;

static unsigned int node_openmailboxes(struct system_node *self)
{

    struct task *task = task_findactive();

    list_add(&self->mailboxes, &task->blockitem);

    return (unsigned int)self;

}

static unsigned int node_closemailboxes(struct system_node *self)
{

    struct task *task = task_findactive();

    list_remove(&self->mailboxes, &task->blockitem);

    return (unsigned int)self;

}

static unsigned int node_readgroup(struct system_node *self, unsigned int offset, unsigned int count, void *buffer)
{

    struct record *record = buffer;
    struct system_node *node = (offset) ? (struct system_node *)offset : self->parent;

    record->id = (unsigned int)node;
    record->size = 0;
    record->length = memory_read(record->name, RECORD_NAMESIZE, node->name, ascii_length(node->name), 0);

    if (node->type & SYSTEM_NODETYPE_MULTI)
    {

        char *index = ":0";

        index[1] = '0' + node->index;
{'fraction_non_alphanumeric': 0.1266638042078145, 'fraction_numerical': 0.004293688278231, 'mean_word_length': 4.143487858719647, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 37, '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': '2328620', 'n_tokens_mistral': 755, 'n_tokens_neox': 727, 'n_words': 193}