<commit_before>#pragma once

#include <truth/types.h>

struct lock {
    atomic_uint readers;
    atomic_bool writer;
};

void lock_acquire_reader(struct lock *lock);
void lock_release_reader(struct lock *lock);

void lock_acquire_writer(struct lock *lock);
void lock_release_writer(struct lock *lock);

#define Clear_Lock { .readers = 0, .writer = false }
<commit_msg>Rename lock initializer<commit_after>#pragma once

#include <truth/types.h>

struct lock {
    atomic_uint readers;
    atomic_bool writer;
};

void lock_acquire_reader(struct lock *lock);
void lock_release_reader(struct lock *lock);

void lock_acquire_writer(struct lock *lock);
void lock_release_writer(struct lock *lock);

#define Lock_Clear { .readers = 0, .writer = false }

{'fraction_non_alphanumeric': 0.10160427807486631, 'fraction_numerical': 0.00267379679144385, 'mean_word_length': 5.628318584070796, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1315791', 'n_tokens_mistral': 247, 'n_tokens_neox': 242, 'n_words': 66}