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
38dce835
Commit
38dce835
authored
Mar 07, 2018
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt locks created by rt_ini
parent
cbbe4b71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
src/exe/rt_ini/src/rt_ini.c
src/exe/rt_ini/src/rt_ini.c
+40
-4
No files found.
src/exe/rt_ini/src/rt_ini.c
View file @
38dce835
...
...
@@ -60,6 +60,7 @@
#include "rt_qcom.h"
#include "rt_io_base.h"
#include "rt_redu.h"
#include "rt_lck.h"
#include "rt_ini_msg.h"
#include "rt_errh_msg.h"
#include "rt_pwr_msg.h"
...
...
@@ -69,6 +70,8 @@ static int checkErrors (ini_sContext*);
static
pwr_tStatus
events
(
ini_sContext
*
cp
);
static
pwr_tStatus
interactive
(
int
argc
,
char
**
argv
,
ini_sContext
*
cp
);
static
pwr_tStatus
stop
(
int
argc
,
char
**
argv
,
ini_sContext
*
cp
);
static
void
create_locks
();
static
void
delete_locks
();
static
void
load_backup
();
static
void
logChanges
(
ini_sContext
*
);
static
void
logCardinality
(
ini_sContext
*
);
...
...
@@ -216,6 +219,8 @@ start (
qcom_SetRedundancyState
(
state
);
}
create_locks
();
io_init_signals
();
load_backup
();
...
...
@@ -515,15 +520,16 @@ terminate (
gdb_UnlinkDb
();
qdb_UnlinkDb
();
delete_locks
();
/* Destroy message handler semaphore */
mh_UtilDestroyEvent
();
#if defined OS_PO
I
SIX
/* Unlink errlog mw
essage queue */
#if defined OS_POSIX
/* Unlink errlog m
essage queue */
errl_Unlink
();
#endif
#endif
exit
(
1
);
}
...
...
@@ -920,6 +926,36 @@ events (
return
INI__SUCCESS
;
}
static
void
create_locks
()
{
pwr_tStatus
sts
;
lck_Create
(
&
sts
,
lck_eLock_Time
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock create time, %m"
,
sts
);
lck_Create
(
&
sts
,
lck_eLock_Str
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock create str, %m"
,
sts
);
lck_Create
(
&
sts
,
lck_eLock_NMps
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock create NMps, %m"
,
sts
);
}
static
void
delete_locks
()
{
pwr_tStatus
sts
;
lck_Delete
(
&
sts
,
lck_eLock_Time
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock delete time, %m"
,
sts
);
lck_Delete
(
&
sts
,
lck_eLock_Str
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock delete str, %m"
,
sts
);
lck_Delete
(
&
sts
,
lck_eLock_NMps
);
if
(
EVEN
(
sts
))
errh_Fatal
(
"lock delete NMps, %m"
,
sts
);
}
static
void
load_backup
()
{
...
...
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