Browse Source

Document the new structures better

Clara Hobbs 6 years ago
parent
commit
5ef2002ac8
3 changed files with 17 additions and 0 deletions
  1. 4
    0
      lib/include/pdb_int_n.h
  2. 1
    0
      lib/include/pdb_pe.h
  3. 12
    0
      lib/include/pdb_prl.h

+ 4
- 0
lib/include/pdb_int_n.h View File

@@ -24,7 +24,11 @@
24 24
 #include "pdb_conf.h"
25 25
 
26 26
 
27
+/*
28
+ * Structure for the INT_N thread
29
+ */
27 30
 struct pdb_int_n {
31
+    /* INT_N thread and working area */
28 32
     THD_WORKING_AREA(_wa, PDB_INT_N_WA_SIZE);
29 33
     thread_t *thread;
30 34
 };

+ 1
- 0
lib/include/pdb_pe.h View File

@@ -39,6 +39,7 @@
39 39
  * Structure for Policy Engine thread and variables
40 40
  */
41 41
 struct pdb_pe {
42
+    /* Policy Engine thread and working area */
42 43
     THD_WORKING_AREA(_wa, PDB_PE_WA_SIZE);
43 44
     thread_t *thread;
44 45
 

+ 12
- 0
lib/include/pdb_prl.h View File

@@ -26,21 +26,33 @@
26 26
 #include "pdb_conf.h"
27 27
 
28 28
 
29
+/*
30
+ * Structure for the protocol layer threads and variables
31
+ */
29 32
 struct pdb_prl {
33
+    /* RX thread and working area */
30 34
     THD_WORKING_AREA(_rx_wa, PDB_PRLRX_WA_SIZE);
31 35
     thread_t *rx_thread;
36
+    /* TX thread and working area */
32 37
     THD_WORKING_AREA(_tx_wa, PDB_PRLTX_WA_SIZE);
33 38
     thread_t *tx_thread;
39
+    /* Hard reset thread and working area */
34 40
     THD_WORKING_AREA(_hardrst_wa, PDB_HARDRST_WA_SIZE);
35 41
     thread_t *hardrst_thread;
36 42
 
43
+    /* TX mailbox for PD messages to be transmitted */
37 44
     mailbox_t tx_mailbox;
38 45
 
46
+    /* The ID of the last message received */
39 47
     int8_t _rx_messageid;
48
+    /* The message being worked with by the RX thread */
40 49
     union pd_msg *_rx_message;
41 50
 
51
+    /* The ID of the next message we will transmit */
42 52
     int8_t _tx_messageidcounter;
53
+    /* The message being worked with by the TX thread */
43 54
     union pd_msg *_tx_message;
55
+    /* Queue for the TX mailbox */
44 56
     msg_t _tx_mailbox_queue[PDB_MSG_POOL_SIZE];
45 57
 };
46 58
 

Loading…
Cancel
Save