Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
887cc88e
Commit
887cc88e
authored
Apr 02, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling of termination event and process status
parent
22075623
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
2 deletions
+54
-2
src/exe/rt_tmon/src/rt_tmon.c
src/exe/rt_tmon/src/rt_tmon.c
+54
-2
No files found.
src/exe/rt_tmon/src/rt_tmon.c
View file @
887cc88e
...
...
@@ -37,6 +37,11 @@
#include "rt_sansm.h"
#include "rt_subcm.h"
#include "rt_subsm.h"
#include "rt_aproc.h"
#include "rt_pwr_msg.h"
#include "rt_ini_event.h"
#include "rt_qcom.h"
#include "rt_qcom_msg.h"
typedef
struct
s_Timer
sTimer
;
...
...
@@ -72,6 +77,11 @@ static time_tClock last_clock;
static
int
timer_flag
;
#endif
static
void
event
(
qcom_sGet
*
get
);
static
void
sancAdd
(
sTimer
*
tp
...
...
@@ -202,18 +212,39 @@ main (
char
**
argv
)
{
pwr_tStatus
sts
;
time_tClock
wait_clock
;
qcom_sQid
my_q
=
qcom_cNQid
;
qcom_sGet
get
;
int
tmo
=
0
;
init
();
if
(
!
qcom_CreateQ
(
&
sts
,
&
my_q
,
NULL
,
"events"
))
{
exit
(
sts
);
}
if
(
!
qcom_Bind
(
&
sts
,
&
my_q
,
&
qcom_cQini
))
{
exit
(
-
1
);
}
gdbroot
->
db
->
log
.
b
.
tmon
=
0
;
for
(
wait_clock
=
0
;;)
{
get
.
data
=
NULL
;
qcom_Get
(
&
sts
,
&
my_q
,
&
get
,
tmo
);
if
(
sts
!=
QCOM__TMO
&&
sts
!=
QCOM__QEMPTY
)
{
if
(
get
.
type
.
b
==
qcom_eBtype_event
)
{
event
(
&
get
);
}
qcom_Free
(
&
sts
,
get
.
data
);
}
if
(
wait_clock
!=
0
)
waitClock
(
wait_clock
);
aproc_TimeStamp
();
now_clock
=
time_Clock
(
NULL
,
NULL
);
if
(
now_clock
<
last_clock
)
{
errh_Info
(
"The uptime clock has wrapped"
);
...
...
@@ -232,6 +263,23 @@ main (
}
}
static
void
event
(
qcom_sGet
*
get
)
{
qcom_sEvent
*
ep
=
(
qcom_sEvent
*
)
get
->
data
;
ini_mEvent
new_event
;
if
(
get
->
type
.
s
!=
qcom_cIini
)
return
;
new_event
.
m
=
ep
->
mask
;
if
(
new_event
.
b
.
terminate
)
{
exit
(
0
);
}
}
/* . */
static
void
...
...
@@ -757,17 +805,20 @@ init(
pwr_tStatus
sts
;
/* Initialize. */
errh_Init
(
"pwr_tmon"
);
errh_Init
(
"pwr_tmon"
,
errh_eAnix_tmon
);
errh_SetStatus
(
PWR__SRVSTARTUP
);
qcom_Init
(
&
sts
,
0
,
"pwr_tmon"
);
if
(
EVEN
(
sts
))
{
errh_Error
(
"qcom_Init, %m"
,
sts
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
sts
);
}
sts
=
gdh_Init
(
"pwr_tmon"
);
if
(
EVEN
(
sts
))
{
errh_Error
(
"gdh_Init, %m"
,
sts
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
sts
);
}
...
...
@@ -796,6 +847,7 @@ init(
subcCheck
(
newTimer
(
NULL
,
NULL
,
subcCheck
));
}
gdb_ScopeUnlock
;
errh_SetStatus
(
PWR__SRUN
);
}
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment