#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <assert.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <fcntl.h>



int main()
{
  int fd = open("./example.txt",O_CREAT | O_RDWR,0644);
  assert(fd != -1);
  char* file_contents = mmap(0,15ull*1024ull*1024ull*1024ull,PROT_READ | PROT_WRITE, MAP_SHARED,fd,0);
  file_contents[0] = 2;
  while (1) {
    if (file_contents[0] == 1)
    {
      printf("read: %s",file_contents+1);
      file_contents[0] = 2;
    }
  }
  return -1;
}