Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
458a3637
Commit
458a3637
authored
Apr 24, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standard message headers
parent
b2c58067
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
codes/lp-msg.h
codes/lp-msg.h
+36
-0
src/util/lp-msg.c
src/util/lp-msg.c
+23
-0
No files found.
codes/lp-msg.h
0 → 100644
View file @
458a3637
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef LP_MSG_H
#define LP_MSG_H
#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
);
#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
*/
src/util/lp-msg.c
0 → 100644
View file @
458a3637
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#include "codes/lp-msg.h"
#include "ross.h"
void
msg_set_header
(
int
magic
,
int
event_type
,
tw_lpid
src
,
msg_header
*
h
){
h
->
magic
=
magic
;
h
->
event_type
=
event_type
;
h
->
src
=
src
;
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment