Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
advLigoRTS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
CDS
software
advLigoRTS
Commits
9727dd81
Commit
9727dd81
authored
2 years ago
by
Ezekiel Dohmen
Browse files
Options
Downloads
Patches
Plain Diff
Incorporating Erik's IPC file locking in feCodeGen
parent
3e6b867c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!439
RCG 5.0 release fro deb 10
,
!367
Build Reorganization Total
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/epics/util/lib/IPCmonitor.pm
+4
-0
4 additions, 0 deletions
src/epics/util/lib/IPCmonitor.pm
src/epics/util/lib/IPCx.pm
+7
-0
7 additions, 0 deletions
src/epics/util/lib/IPCx.pm
with
11 additions
and
0 deletions
src/epics/util/lib/IPCmonitor.pm
+
4
−
0
View file @
9727dd81
package
CDS::
IPCmonitor
;
use
Exporter
;
use
Fcntl
qw(:flock)
;
use
File::
Path
;
@ISA
=
('
Exporter
');
...
...
@@ -239,8 +240,11 @@ my @ipcxMaxNum = (-999,-999,-999,-999);
open
(
TOUCH
,
"
>>
$iFile
");
close
(
TOUCH
);
}
open
(
IPCIN
,
"
<
$iFile
")
||
die
"
***ERROR: IPCx parameter file
$iFile
not found
\n
";
flock
(
IPCIN
,
LOCK_SH
)
||
die
"
***ERROR: IPCx parameter file
$iFile
not locked: $!
\n
";
chomp
(
@inData
=<
IPCIN
>
);
flock
(
IPCIN
,
LOCK_UN
)
||
die
"
***ERROR: IPCx parameter file
$iFile
not unlocked: $!
\n
";
close
IPCIN
;
#
...
...
This diff is collapsed.
Click to expand it.
src/epics/util/lib/IPCx.pm
+
7
−
0
View file @
9727dd81
...
...
@@ -2,6 +2,7 @@ package CDS::IPCx;
use
File::
Path
qw( make_path )
;
use
Exporter
;
use
File::
Path
;
use
Fcntl
qw(:flock)
;
@ISA
=
('
Exporter
');
#// \page IPCx IPCx.pm
...
...
@@ -344,8 +345,11 @@ if ($::ipcxCnt > 0) {
open
(
TOUCH
,
"
>>
$iFile
");
close
(
TOUCH
);
}
open
(
IPCIN
,
"
<
$iFile
")
||
die
"
***ERROR: IPCx parameter file
$iFile
not found
\n
";
flock
(
IPCIN
,
LOCK_SH
)
||
die
"
***ERROR: Failed to lock file
$iFIle
: $!
\n
";
chomp
(
@inData
=<
IPCIN
>
);
flock
(
IPCIN
,
LOCK_UN
)
||
die
"
***ERROR: Failed to unlock file
$iFIle
: $!
\n
";
close
IPCIN
;
#
...
...
@@ -586,7 +590,9 @@ $ipcxRcvrCnt = 0;
# Check if there are any IPCx modules to add to the IPCx parts matrix
#
if
(
$ipcxNotFound
>
0
)
{
open
(
IPCOUT
,
"
>>
$iFile
")
||
die
"
***ERROR: Could not open IPCx parameter file
$iFile
for output
\n
";
flock
(
IPCOUT
,
LOCK_EX
)
||
die
"
***ERROR: Failed to lock IPCx parameter file
$iFile
for output: $!
\n
";
$ipcxRate
=
983040
/
$
::
rate
;
$ipcxNew
=
0
;
...
...
@@ -664,6 +670,7 @@ $ipcxRcvrCnt = 0;
}
}
flock
(
IPCOUT
,
LOCK_UN
)
||
die
"
***ERROR: Failed to unlock IPCx parameter file
$iFile
for output: $!
\n
";
close
IPCOUT
;
...
...
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