Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
f4grx
NuttX RTOS
Commits
da5115e3
Commit
da5115e3
authored
9 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Correct an error in timer_created intoduced when SIGEV_THREAD support was added.
parent
eb53d015
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs
+1
-1
1 addition, 1 deletion
configs
sched/timer/timer_create.c
+20
-14
20 additions, 14 deletions
sched/timer/timer_create.c
with
21 additions
and
15 deletions
configs
@
94cc2c17
Subproject commit
2d69d8ab99187e4270bb4b4bd1d61d5324b81916
Subproject commit
94cc2c17de89faf152b3388349092173f0d165b0
This diff is collapsed.
Click to expand it.
sched/timer/timer_create.c
+
20
−
14
View file @
da5115e3
/********************************************************************************
* sched/timer/timer_create.c
*
* Copyright (C) 2007-2009, 2011, 2014-201
5
Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011, 2014-201
6
Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
...
...
@@ -52,18 +52,6 @@
#ifndef CONFIG_DISABLE_POSIX_TIMERS
/********************************************************************************
* Pre-processor Definitions
********************************************************************************/
/********************************************************************************
* Private Data
********************************************************************************/
/********************************************************************************
* Public Data
********************************************************************************/
/********************************************************************************
* Private Functions
********************************************************************************/
...
...
@@ -213,13 +201,31 @@ int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timer
ret
->
pt_delay
=
0
;
ret
->
pt_wdog
=
wdog
;
/* Was a struct sigevent provided? */
if
(
evp
)
{
/* Yes, copy the entire struct sigevent content */
memcpy
(
&
ret
->
pt_event
,
evp
,
sizeof
(
struct
sigevent
));
}
else
{
memset
(
&
ret
->
pt_event
,
0
,
sizeof
(
struct
sigevent
));
/* "If the evp argument is NULL, the effect is as if the evp argument
* pointed to a sigevent structure with the sigev_notify member
* having the value SIGEV_SIGNAL, the sigev_signo having a default
* signal number, and the sigev_value member having the value of the
* timer ID."
*/
ret
->
pt_event
.
sigev_notify
=
SIGEV_SIGNAL
;
ret
->
pt_event
.
sigev_signo
=
SIGALRM
;
ret
->
pt_event
.
sigev_value
.
sival_ptr
=
ret
;
#ifdef CONFIG_SIG_EVTHREAD
ret
->
pt_event
.
sigev_value
.
sigev_notify_function
=
NULL
;
ret
->
pt_event
.
sigev_value
.
sigev_notify_attributes
=
NULL
;
#endif
}
/* Return the timer */
...
...
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