_takumi

message.h

Mar 4th, 2023
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <sys/types.h>
  2. #include <sys/ipc.h>
  3. #include <sys/sem.h>
  4. #include <sys/shm.h>
  5. #include <stdio.h>
  6.  
  7. #define PERMS   0666
  8.  
  9. #define MSG_TYPE_EMPTY  0
  10. #define MSG_TYPE_STRING 1
  11. #define MSG_TYPE_FINISH 2
  12. #define MAX_STRING      120
  13.  
  14. typedef struct {
  15.   int type;
  16.   int n;
  17. } message_t;
Advertisement
Add Comment
Please, Sign In to add comment