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

static const char *ipc_key_file = "ipc";
static const int ipc_key_proj_id = 0;

/* one "common" page size worth of a shm buffer */
#define IPC_SHM_SIZE 4096

enum semaphore_id {
	SEMAPHORE_RCV_MUTEX = 0,
	SEMAPHORE_SND_MUTEX,
	SEMAPHORE_MEMORY,
	SEMAPHORE_DATA,
	_SEMAPHORE_COUNT
};

enum rcv_state {
	RCV_NOT_DONE,
	RCV_OK,
	RCV_IOERROR
};

enum snd_state {
	SND_NOT_DONE,
	SND_OK,
	SND_EOF,
	SND_IOERROR
};

struct shared_memory {
	enum rcv_state rcv_state;
	enum snd_state snd_state;
	size_t data_amount;
	char data[1];
};

#define DATA_MAX (sizeof(struct shared_memory) - 1)

static const struct shared_memory shared_memory_init = {
	.rcv_state = RCV_OK,
	.snd_state = SND_NOT_DONE,
};<commit_msg>course2-1: seminar6: remove a redundant definition.<commit_after>#include "../common_sem.h"

static const char *ipc_key_file = "ipc";
static const int ipc_key_proj_id = 0;

/* one "common" page size worth of a shm buffer */
#define IPC_SHM_SIZE 4096

enum semaphore_id {
	SEMAPHORE_RCV_MUTEX = 0,
	SEMAPHORE_SND_MUTEX,
	SEMAPHORE_MEMORY,
	SEMAPHORE_DATA,
	_SEMAPHORE_COUNT
};

enum rcv_state {
	RCV_NOT_DONE,
	RCV_OK,
	RCV_IOERROR
};

enum snd_state {
	SND_NOT_DONE,
	SND_OK,
	SND_EOF,
	SND_IOERROR
};

struct shared_memory {
	enum rcv_state rcv_state;
	enum snd_state snd_state;
	size_t data_amount;
	char data[1];
};

#define DATA_MAX (sizeof(struct shared_memory) - 1)
{'fraction_non_alphanumeric': 0.09187279151943463, 'fraction_numerical': 0.01342756183745583, 'mean_word_length': 5.07725321888412, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6689494', 'n_tokens_mistral': 643, 'n_tokens_neox': 626, 'n_words': 134}