Skip to content

Commit 318f478

Browse files
authored
Merge pull request contiki-os#2692 from pjonsson/psock-struct-padding
psock: avoid padding in psock
2 parents 8e6d82c + 79aa3ad commit 318f478

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

os/net/ipv6/psock.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,21 @@ struct psock_buf {
110110
* elements.
111111
*/
112112
struct psock {
113-
struct pt pt, psockpt; /* Protothreads - one that's using the psock
114-
functions, and one that runs inside the
115-
psock functions. */
116113
const uint8_t *sendptr; /* Pointer to the next data to be sent. */
117114
uint8_t *readptr; /* Pointer to the next data to be read. */
118-
115+
119116
uint8_t *bufptr; /* Pointer to the buffer used for buffering
120117
incoming data. */
121-
122-
uint16_t sendlen; /* The number of bytes left to be sent. */
123-
uint16_t readlen; /* The number of bytes left to be read. */
124-
125118
struct psock_buf buf; /* The structure holding the state of the
126119
input buffer. */
127120
unsigned int bufsize; /* The size of the input buffer. */
128-
121+
122+
uint16_t sendlen; /* The number of bytes left to be sent. */
123+
uint16_t readlen; /* The number of bytes left to be read. */
124+
125+
struct pt pt, psockpt; /* Protothreads - one that's using the psock
126+
functions, and one that runs inside the
127+
psock functions. */
129128
unsigned char state; /* The state of the protosocket. */
130129
};
131130

0 commit comments

Comments
 (0)