mirror of
https://github.com/ada-dmitry/TMP_C712.git
synced 2026-09-24 09:10:16 +00:00
27 lines
508 B
C
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
|