summaryrefslogtreecommitdiff
path: root/nuttx/sched/timer_internal.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-06-03 01:21:12 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-06-03 01:21:12 +0000
commit71342bb5e74b0c9cf55f5d581588dee0ed068e73 (patch)
treeedc65f99f992d519b7c435200580a4cb9b3c7f65 /nuttx/sched/timer_internal.h
parent80f36a0d652e60a1dab89ce4a14409d51961cd75 (diff)
downloadpx4-nuttx-71342bb5e74b0c9cf55f5d581588dee0ed068e73.tar.gz
px4-nuttx-71342bb5e74b0c9cf55f5d581588dee0ed068e73.tar.bz2
px4-nuttx-71342bb5e74b0c9cf55f5d581588dee0ed068e73.zip
Improved timer life control fix
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@767 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/timer_internal.h')
-rw-r--r--nuttx/sched/timer_internal.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/nuttx/sched/timer_internal.h b/nuttx/sched/timer_internal.h
index e4403499c..39946a8d3 100644
--- a/nuttx/sched/timer_internal.h
+++ b/nuttx/sched/timer_internal.h
@@ -50,11 +50,6 @@
********************************************************************************/
#define PT_FLAGS_PREALLOCATED 0x01 /* Timer comes from a pool of preallocated timers */
-#define PT_FLAGS_BUSY 0x02 /* Timer cannot be deleted now */
-#define PT_FLAGS_DELETED 0x04 /* Busy timer marked for deletion */
-
-#define PT_FLAGS_STATIC PT_FLAGS_PREALLOCATED
-#define PT_FLAGS_DYNAMIC (~PT_FLAGS_STATIC)
/********************************************************************************
* Public Types
@@ -67,6 +62,7 @@ struct posix_timer_s
FAR struct posix_timer_s *flink;
ubyte pt_flags; /* See PT_FLAGS_* definitions */
+ ubyte pt_crefs; /* Reference count */
ubyte pt_signo; /* Notification signal */
pid_t pt_owner; /* Creator of timer */
int pt_delay; /* If non-zero, used to reset repetitive timers */
@@ -98,5 +94,6 @@ extern volatile sq_queue_t g_alloctimers;
extern void weak_function timer_initialize(void);
extern void weak_function timer_deleteall(pid_t pid);
+extern int timer_release(FAR struct posix_timer_s *timer);
#endif /* __TIMER_INTERNAL_H */