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
43421720
Commit
43421720
authored
Jan 25, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling of Terminate and OldPlcStop event separatley
parent
ab890a9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
src/exp/rt/src/rt_plc_process.c
src/exp/rt/src/rt_plc_process.c
+23
-9
No files found.
src/exp/rt/src/rt_plc_process.c
View file @
43421720
/*
/*
* Proview $Id: rt_plc_process.c,v 1.1
1 2007-05-16 12:33:55
claes Exp $
* Proview $Id: rt_plc_process.c,v 1.1
2 2008-01-25 14:31:43
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#include "rt_que.h"
#include "rt_que.h"
#include "rt_csup.h"
#include "rt_csup.h"
#include "rt_ini_event.h"
#include "rt_ini_event.h"
#include "rt_nmps_lock.h"
#include "rt_aproc.h"
#include "rt_aproc.h"
#include "rt_pwr_msg.h"
#include "rt_pwr_msg.h"
...
@@ -142,6 +143,7 @@ int main (
...
@@ -142,6 +143,7 @@ int main (
)
)
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
int
event
;
plc_sProcess
*
pp
;
plc_sProcess
*
pp
;
uid_t
ruid
;
uid_t
ruid
;
struct
passwd
*
pwd
;
struct
passwd
*
pwd
;
...
@@ -198,21 +200,33 @@ int main (
...
@@ -198,21 +200,33 @@ int main (
errh_SetStatus
(
PWR__SRUN
);
errh_SetStatus
(
PWR__SRUN
);
qcom_Wait
And
(
&
sts
,
&
pp
->
eventQ
,
&
qcom_cQini
,
ini_mEvent_oldPlcStop
,
qcom_cTmoEternal
);
qcom_Wait
Or
(
&
sts
,
&
pp
->
eventQ
,
&
qcom_cQini
,
ini_mEvent_terminate
|
ini_mEvent_oldPlcStop
,
qcom_cTmoEternal
,
&
event
);
errh_SetStatus
(
PWR__SRVTERM
);
switch
(
event
)
{
case
ini_mEvent_terminate
:
errh_SetStatus
(
PWR__SRVTERM
);
stop_threads
(
pp
);
clean_all
(
pp
);
nmps_delete_lock
(
&
sts
);
break
;
case
ini_mEvent_oldPlcStop
:
errh_SetStatus
(
PWR__SRVTERM
);
time_Uptime
(
&
sts
,
&
pp
->
PlcProcess
->
StopTime
,
NULL
);
time_Uptime
(
&
sts
,
&
pp
->
PlcProcess
->
StopTime
,
NULL
);
stop_threads
(
pp
);
stop_threads
(
pp
);
save_values
(
pp
);
save_values
(
pp
);
qcom_SignalOr
(
&
sts
,
&
qcom_cQini
,
ini_mEvent_oldPlcStopDone
);
qcom_SignalOr
(
&
sts
,
&
qcom_cQini
,
ini_mEvent_oldPlcStopDone
);
#if defined OS_ELN
#if defined OS_ELN
sts
=
proc_SetPriority
(
31
);
sts
=
proc_SetPriority
(
31
);
#endif
#endif
clean_all
(
pp
);
clean_all
(
pp
);
break
;
default:
;
}
exit
(
0
);
exit
(
0
);
}
}
...
...
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