C++ TargetRTS
Loading...
Searching...
No Matches
RTTimerList.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTTimerList_h__
11#define __RTTimerList_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTConfig_h__
18#include <RTConfig.h>
19#endif
20
21class RTController;
22class RTTimerNode;
23struct RTTimespec;
24
26{
27public:
28 RTTimerList( void );
29 ~RTTimerList( void );
30
31 // How many entries are in the list?
32 RTS_INLINE int length( void ) const;
33
34 // Add node to list. Return true iff new node is at head of list.
35 int insert( RTTimerNode * );
36
37 // Remove a specific entry in the list.
38 void remove( RTTimerNode * );
39
40 // Cancel all entries in the list.
41 void cancelAll( RTController * );
42
43 // Expire all timeouts that should have occured by 'now'.
44 void expire( const RTTimespec & now, RTController * );
45
46 // Fetch the earliest time in the list.
47 void headTime( RTTimespec & ) const;
48
49 class Link
50 {
51 public:
52 RTS_INLINE Link( void );
53
54 private:
55 friend class RTTimerList;
56
57 unsigned index;
58 };
59
60private:
61 RTTimerNode ** nodes;
62 unsigned space;
63 unsigned used;
64
65 // unavailable methods
66 RTTimerList( const RTTimerList & );
67 RTTimerList & operator=( const RTTimerList & );
68};
69
70#if RTS_INLINES
71#include <RTTimerList.inl>
72#endif
73
74#endif // __RTTimerList_h__
A controller manages a group of capsule instances that all run in the same physical thread (i....
Definition: RTController.h:54
Definition: RTTimerList.h:26
Definition: RTTimerNode.h:47
A time value which can represent either an absolute or relative time.
Definition: RTTimespec.h:29