5 works needs tweking
This commit is contained in:
17
lab_5/common.h
Normal file
17
lab_5/common.h
Normal file
@@ -0,0 +1,17 @@
|
||||
// common.h
|
||||
#pragma once
|
||||
#include <sys/types.h>
|
||||
|
||||
#define REQ_QUEUE "/winnie_req" // общая очередь запросов к серверу (POSIX name starts with '/')
|
||||
#define NAME_MAXLEN 64
|
||||
|
||||
typedef struct {
|
||||
pid_t pid; // PID пчелы
|
||||
int want; // желаемая порция
|
||||
char replyq[NAME_MAXLEN];// имя очереди для ответов (например, "/bee_1234")
|
||||
} req_msg_t;
|
||||
|
||||
typedef struct {
|
||||
int granted; // выдано меда
|
||||
int remain; // остаток мёда
|
||||
} rep_msg_t;
|
||||
Reference in New Issue
Block a user