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
e27ce246
Commit
e27ce246
authored
9 years ago
by
Kaspar Schleiser
Browse files
Options
Downloads
Patches
Plain Diff
sys: xtimer: add xtimer_wakeup64
parent
a22f0a3c
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
sys/include/xtimer.h
+12
-0
12 additions, 0 deletions
sys/include/xtimer.h
sys/xtimer/xtimer.c
+8
-0
8 additions, 0 deletions
sys/xtimer/xtimer.c
with
20 additions
and
0 deletions
sys/include/xtimer.h
+
12
−
0
View file @
e27ce246
...
@@ -215,6 +215,18 @@ void xtimer_set_msg64(xtimer_t *timer, uint64_t offset, msg_t *msg, kernel_pid_t
...
@@ -215,6 +215,18 @@ void xtimer_set_msg64(xtimer_t *timer, uint64_t offset, msg_t *msg, kernel_pid_t
*/
*/
void
xtimer_set_wakeup
(
xtimer_t
*
timer
,
uint32_t
offset
,
kernel_pid_t
pid
);
void
xtimer_set_wakeup
(
xtimer_t
*
timer
,
uint32_t
offset
,
kernel_pid_t
pid
);
/**
* @brief Set a timer that wakes up a thread, 64bit version
*
* This function sets a timer that will wake up a thread when the timer has
* expired.
*
* @param[in] timer timer struct to work with
* @param[in] offset microseconds from now
* @param[in] pid pid of the thread that will be woken up
*/
void
xtimer_set_wakeup64
(
xtimer_t
*
timer
,
uint64_t
offset
,
kernel_pid_t
pid
);
/**
/**
* @brief Set a timer to execute a callback at some time in the future
* @brief Set a timer to execute a callback at some time in the future
*
*
...
...
This diff is collapsed.
Click to expand it.
sys/xtimer/xtimer.c
+
8
−
0
View file @
e27ce246
...
@@ -127,6 +127,14 @@ void xtimer_set_wakeup(xtimer_t *timer, uint32_t offset, kernel_pid_t pid)
...
@@ -127,6 +127,14 @@ void xtimer_set_wakeup(xtimer_t *timer, uint32_t offset, kernel_pid_t pid)
xtimer_set
(
timer
,
offset
);
xtimer_set
(
timer
,
offset
);
}
}
void
xtimer_set_wakeup64
(
xtimer_t
*
timer
,
uint64_t
offset
,
kernel_pid_t
pid
)
{
timer
->
callback
=
_callback_wakeup
;
timer
->
arg
=
(
void
*
)
((
intptr_t
)
pid
);
_xtimer_set64
(
timer
,
offset
,
offset
>>
32
);
}
/**
/**
* see http://www.hackersdelight.org/magic.htm.
* see http://www.hackersdelight.org/magic.htm.
* This is to avoid using long integer division functions
* This is to avoid using long integer division functions
...
...
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