From: Rafał Długołęcki Date: Sat, 21 Jun 2014 18:39:29 +0000 (+0200) Subject: Document Message Queue variables. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=761a17f0fa43527cec843a4fa95ec7cf7ad2d476;p=wsti_so.git Document Message Queue variables. --- diff --git a/src/process1.c b/src/process1.c index 601c356..e440107 100644 --- a/src/process1.c +++ b/src/process1.c @@ -48,11 +48,24 @@ struct message { struct message * processes = NULL; /** - * Message queue variables + * Message Queue variables + */ + +/** + * Unique key of message queue. */ key_t qkey = 12356; + +/** + * Queue descriptor. + */ int qid; +/** + * Structure holding queue message data. + * Parameter mtype describes process to whom message is sent. + * Parameter signo is a signal to raise after getting message. + */ struct queue_message { long mtype; int signo[1]; diff --git a/src/process2.c b/src/process2.c index d498f1c..03aea04 100644 --- a/src/process2.c +++ b/src/process2.c @@ -52,11 +52,24 @@ struct message { struct message * processes = NULL; /** - * Message queue variables + * Message Queue variables + */ + +/** + * Unique key of message queue. */ key_t qkey = 12356; + +/** + * Queue descriptor. + */ int qid; +/** + * Structure holding queue message data. + * Parameter mtype describes process to whom message is sent. + * Parameter signo is a signal to raise after getting message. + */ struct queue_message { long mtype; int signo[1]; diff --git a/src/process3.c b/src/process3.c index 6453a8f..91212e9 100644 --- a/src/process3.c +++ b/src/process3.c @@ -35,7 +35,8 @@ key_t shmkey = 18912; int shmid; /** - * Message shared by processes. Contains array of process IDs + * Structure holding array of process IDs. + * Message is shared by processes. Contains array of process IDs */ struct message { pid_t pids[3]; @@ -44,11 +45,24 @@ struct message { struct message * processes = NULL; /** - * Message queue variables + * Message Queue variables + */ + +/** + * Unique key of message queue. */ key_t qkey = 12356; + +/** + * Queue descriptor. + */ int qid; +/** + * Structure holding queue message data. + * Parameter mtype describes process to whom message is sent. + * Parameter signo is a signal to raise after getting message. + */ struct queue_message { long mtype; int signo[1];