Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
d7020e_srp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
d7020e
d7020e_srp
Commits
3a2d55f6
Commit
3a2d55f6
authored
8 years ago
by
pln
Browse files
Options
Downloads
Patches
Plain Diff
function instead of macro for trace event
parent
19479a8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/SRP_wcet.h
+11
-8
11 additions, 8 deletions
include/SRP_wcet.h
with
11 additions
and
8 deletions
include/SRP_wcet.h
+
11
−
8
View file @
3a2d55f6
...
...
@@ -33,7 +33,7 @@ typedef enum
E
}
action
;
typedef
struct
locks
typedef
struct
{
/* The DWT counter value */
uint32_t
time
;
...
...
@@ -42,25 +42,28 @@ typedef struct locks
/* If locked or released */
action
action
;
}
locks
;
}
event
;
int
event_count
=
0
;
/* Create array containing structs of type locks */
#define MAX_NUM_LOCKS 10
locks
eventlist
[
MAX_NUM_LOCKS
];
#define TRACE_EVENT(event, el)({eventlist[event_count].time = DWT->CYCCNT; eventlist[event_count].action = event; eventlist[event_count].elem = el; event_count+=1;})
event
eventlist
[
MAX_NUM_LOCKS
];
void
__attribute__
((
noinline
))
trace_event
(
action
a
,
event
e
)
{
eventlist
[
event_count
].
time
=
DWT
->
CYCCNT
;
eventlist
[
event_count
].
action
=
a
;
eventlist
[
event_count
].
elem
=
e
;
event_count
+=
1
;
}
#define LOCK(X) trace_event(L, X);
#define UNLOCK(X) trace_event(R, X);
#define IRQh(J) (J##_IRQh)
#define JOB_REQUEST(J) { }
#define LOCK(X) TRACE_EVENT(L, X);
#define UNLOCK(X) TRACE_EVENT(R, X);
#define TASK(J) void IRQh(J) ()
#define BREAKPOINT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment