feedback-arc-set/common.h

47 lines
810 B
C

/**
* @file common.h
* @date 2018-05-21
*
* @brief Header file for common includes and constants as well as data structures.
*/
// guard block
#ifndef COMMON_H
#define COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <signal.h>
#include <semaphore.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/mman.h>
#include <fcntl.h>
#define SHM_NAME "/01527193"
#define PERMISSION (0600)
#define SEM_FREE_SPACE "/sem_free_space_01527193"
#define SEM_USED_SPACE "/sem_used_space_01527193"
#define SEM_WRITE_END "/sem_write_end_01527193"
#define MAX_ITEMS 16
struct circ_buf {
int quit;
int head;
int tail;
int data[MAX_ITEMS+1];
};
#endif /* ifndef COMMON_H */