Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int fd = shm_open("EscapeRoom", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
- ftruncate(fd, sizeof(struct EscapeRoom));
- struct EscapeRoom *room;
- int prot = prot = PROT_READ | PROT_WRITE;
- int flags = MAP_SHARED | MAP_ANONYMOUS;
- room = (struct EscapeRoom *)mmap(NULL, sizeof(struct EscapeRoom), prot, flags, fd, 0);
- int liczbaGraczy;
- int liczbaPokoi;
- scanf("%d %d", &liczbaPokoi, &liczbaGraczy);
- room->ileDoWejscia = liczbaGraczy;
- room->ileDoWyjscia = liczbaGraczy;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement