Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
cm-projects
RIOT
Commits
b522c134
Commit
b522c134
authored
9 years ago
by
Oleg Hahm
Browse files
Options
Downloads
Patches
Plain Diff
example ccn-lite-relay; enable TLSF for native
With the previous commit TLSF should compile for native, too.
parent
60e283e6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/ccn-lite-relay/Makefile
+1
-4
1 addition, 4 deletions
examples/ccn-lite-relay/Makefile
examples/ccn-lite-relay/main.c
+4
-12
4 additions, 12 deletions
examples/ccn-lite-relay/main.c
with
5 additions
and
16 deletions
examples/ccn-lite-relay/Makefile
+
1
−
4
View file @
b522c134
...
...
@@ -33,10 +33,7 @@ USEMODULE += xtimer
USEMODULE
+=
random
USEMODULE
+=
prng_minstd
ifneq
(,$(filter-out native,$(BOARD)))
USEPKG
+=
tlsf
endif
USEPKG
+=
tlsf
USEPKG
+=
ccn-lite
USEMODULE
+=
ccn-lite-utils
...
...
This diff is collapsed.
Click to expand it.
examples/ccn-lite-relay/main.c
+
4
−
12
View file @
b522c134
...
...
@@ -20,11 +20,7 @@
#include
<stdio.h>
/* TODO: currently TLSF has to be disabled for native because of its stricter
* CFLAGS (-pedantic) */
#ifndef BOARD_NATIVE
# include "tlsf-malloc.h"
#endif
#include
"tlsf-malloc.h"
#include
"msg.h"
#include
"shell.h"
#include
"ccn-lite-riot.h"
...
...
@@ -33,17 +29,13 @@
#define MAIN_QUEUE_SIZE (8)
static
msg_t
_main_msg_queue
[
MAIN_QUEUE_SIZE
];
#ifndef BOARD_NATIVE
/* some buffer for the heap */
# define TLSF_BUFFER (10240 / sizeof(uint32_t))
static
uint32_t
_tlsf_heap
[
TLSF_BUFFER
];
#endif
/* 10kB buffer for the heap should be enough for everyone */
#define TLSF_BUFFER (10240 / sizeof(uint32_t))
static
uint32_t
_tlsf_heap
[
TLSF_BUFFER
];
int
main
(
void
)
{
#ifndef BOARD_NATIVE
tlsf_create_with_pool
(
_tlsf_heap
,
sizeof
(
_tlsf_heap
));
#endif
msg_init_queue
(
_main_msg_queue
,
MAIN_QUEUE_SIZE
);
puts
(
"Basic CCN-Lite example"
);
...
...
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