-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathlp-msg.h
More file actions
44 lines (35 loc) · 904 Bytes
/
lp-msg.h
File metadata and controls
44 lines (35 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef LP_MSG_H
#define LP_MSG_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ross.h"
/* It is good practice to always include the src LPID, a unique message
* identifier, and a "magic" number to ensure that the LP type receiving the
* message is the intended recipient. This is formalized in the following
* struct and is used in a few places where LP-to-LP communication is
* abstracted */
typedef struct msg_header_s {
tw_lpid src;
int event_type;
int magic;
} msg_header;
/* data structure utilities */
void msg_set_header(int magic, int event_type, tw_lpid src, msg_header *h);
#ifdef __cplusplus
}
#endif
#endif /* end of include guard: LP_MSG_H */
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/