Files
prog.l_ada/TMP/Practice/04.10/shmat/svshm_string.h
T
2023-10-20 15:00:30 +03:00

27 lines
508 B
C

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define errExit(msg) \
do \
{ \
perror(msg); \
exit(EXIT_FAILURE); \
} while (0)
union semun
{ /* Used in calls to semctl() */
int val;
struct semid_ds *buf;
unsigned short *array;
#if defined(__linux__)
struct seminfo *__buf;
#endif
};
#define MEM_SIZE 4096