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
cbf0c841
Commit
cbf0c841
authored
Jan 17, 2018
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sev server threads, refid tree mutex added and compile on 64
parent
62383b1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
remote/exe/rs_remote_rabbitmq/src/rs_remote_rabbitmq.c
remote/exe/rs_remote_rabbitmq/src/rs_remote_rabbitmq.c
+2
-2
sev/exe/sev_repair/src/sev_repair.cpp
sev/exe/sev_repair/src/sev_repair.cpp
+3
-3
sev/exe/sev_server/src/sev_server.cpp
sev/exe/sev_server/src/sev_server.cpp
+13
-1
sev/exe/sev_server/src/sev_server.h
sev/exe/sev_server/src/sev_server.h
+1
-0
No files found.
remote/exe/rs_remote_rabbitmq/src/rs_remote_rabbitmq.c
View file @
cbf0c841
...
...
@@ -140,7 +140,7 @@ int rmq_connect()
if
(
!
ctx
->
conn
)
{
ctx
->
conn
=
amqp_new_connection
();
printf
(
"Connection : %u
\n
"
,
(
unsigned
int
)
ctx
->
conn
);
//
printf( "Connection : %u\n", (unsigned int)ctx->conn);
}
if
(
!
ctx
->
socket
)
{
...
...
@@ -320,7 +320,7 @@ unsigned int rmq_receive()
printf
(
"Unknown Reply type: %d
\n
"
,
ret
.
reply_type
);
}
if
(
debug
)
printf
(
"Received message %d
\n
"
,
envelope
.
message
.
body
.
len
);
if
(
debug
)
printf
(
"Received message %d
\n
"
,
(
int
)
envelope
.
message
.
body
.
len
);
if
(
envelope
.
message
.
body
.
len
>
0
&&
rn_rmq
->
DisableHeader
)
{
...
...
sev/exe/sev_repair/src/sev_repair.cpp
View file @
cbf0c841
...
...
@@ -250,7 +250,7 @@ void sev_repair::clean_item( int idx, int print_idx)
printf
(
"-- Processing %d (%u) %s
\n
"
,
idx
,
(
unsigned
int
)
m_db
->
m_items
.
size
(),
m_db
->
m_items
[
idx
].
tablename
);
else
printf
(
"-- Processing %s
\n
"
,
m_db
->
m_items
[
idx
].
tablename
);
m_db
->
delete_old_objectdata
(
&
m_sts
,
m_db
->
m_items
[
idx
].
tablename
,
m_db
->
delete_old_objectdata
(
&
m_sts
,
0
,
m_db
->
m_items
[
idx
].
tablename
,
m_db
->
m_items
[
idx
].
options
,
limit
,
m_db
->
m_items
[
idx
].
scantime
,
(
float
)
0xEFFFFFFF
);
}
else
{
...
...
@@ -258,7 +258,7 @@ void sev_repair::clean_item( int idx, int print_idx)
printf
(
"-- Processing %d (%u) %s
\n
"
,
idx
,
(
unsigned
int
)
m_db
->
m_items
.
size
(),
m_db
->
m_items
[
idx
].
tablename
);
else
printf
(
"-- Processing %s
\n
"
,
m_db
->
m_items
[
idx
].
tablename
);
m_db
->
delete_old_data
(
&
m_sts
,
m_db
->
m_items
[
idx
].
tablename
,
m_db
->
delete_old_data
(
&
m_sts
,
0
,
m_db
->
m_items
[
idx
].
tablename
,
m_db
->
m_items
[
idx
].
options
,
limit
,
m_db
->
m_items
[
idx
].
scantime
,
(
float
)
0xEFFFFFFF
);
}
}
...
...
@@ -428,4 +428,4 @@ int main (int argc, char *argv[])
}
#else
int
main
(){}
#endif
\ No newline at end of file
#endif
sev/exe/sev_server/src/sev_server.cpp
View file @
cbf0c841
...
...
@@ -216,6 +216,7 @@ int sev_server::init( int noneth)
m_db
->
get_objectitems
(
&
m_sts
);
m_refid
=
tree_CreateTable
(
&
sts
,
sizeof
(
pwr_tRefId
),
offsetof
(
sev_sRefid
,
id
),
sizeof
(
sev_sRefid
),
100
,
sev_comp_refid
);
sts
=
thread_MutexInit
(
&
m_refid_mutex
);
// Create a queue to server
qcom_sQattr
attr
;
...
...
@@ -643,14 +644,16 @@ int sev_server::check_histitems( sev_sMsgHistItems *msg, unsigned int size)
// Remove all refid's for this node
pwr_tNid
nid
=
msg
->
Items
[
0
].
sevid
.
nid
;
pwr_tStatus
sts
;
sev_sRefid
*
rp
=
(
sev_sRefid
*
)
tree_Minimum
(
&
sts
,
m_refid
);
sev_sRefid
*
succ_rp
;
thread_MutexLock
(
&
m_refid_mutex
);
sev_sRefid
*
rp
=
(
sev_sRefid
*
)
tree_Minimum
(
&
sts
,
m_refid
);
while
(
rp
)
{
succ_rp
=
(
sev_sRefid
*
)
tree_Successor
(
&
sts
,
m_refid
,
rp
);
if
(
rp
->
id
.
nid
==
nid
)
tree_Remove
(
&
sts
,
m_refid
,
&
rp
->
id
);
rp
=
succ_rp
;
}
thread_MutexUnlock
(
&
m_refid_mutex
);
for
(
int
i
=
0
;
i
<
item_cnt
;
i
++
)
{
if
(
msg
->
Items
[
i
].
attrnum
>
0
)
{
...
...
@@ -778,8 +781,10 @@ int sev_server::check_histitems( sev_sMsgHistItems *msg, unsigned int size)
sev_sRefid
*
rp
;
rk
=
buffP
->
sevid
;
thread_MutexLock
(
&
m_refid_mutex
);
rp
=
(
sev_sRefid
*
)
tree_Insert
(
&
sts
,
m_refid
,
&
rk
);
rp
->
idx
=
idx
;
thread_MutexUnlock
(
&
m_refid_mutex
);
}
int
numberOfAttributes
=
buffP
->
attrnum
;
...
...
@@ -821,8 +826,10 @@ int sev_server::check_histitems( sev_sMsgHistItems *msg, unsigned int size)
sev_sRefid
*
rp
;
rk
=
msg
->
Items
[
i
].
sevid
;
thread_MutexLock
(
&
m_refid_mutex
);
rp
=
(
sev_sRefid
*
)
tree_Insert
(
&
sts
,
m_refid
,
&
rk
);
rp
->
idx
=
idx
;
thread_MutexUnlock
(
&
m_refid_mutex
);
}
}
else
{
...
...
@@ -874,7 +881,10 @@ int sev_server::receive_histdata( sev_sMsgHistDataStore *msg, unsigned int size,
sev_sRefid
*
rp
;
pwr_tRefId
rk
=
dp
->
sevid
;
thread_MutexLock
(
&
m_refid_mutex
);
rp
=
(
sev_sRefid
*
)
tree_Find
(
&
sts
,
m_refid
,
&
rk
);
thread_MutexUnlock
(
&
m_refid_mutex
);
if
(
!
rp
)
{
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
continue
;
...
...
@@ -1449,7 +1459,9 @@ void *sev_server::receive_histdata_thread( void *arg)
sev_sRefid
*
rp
;
pwr_tRefId
rk
=
dp
->
sevid
;
thread_MutexLock
(
&
sev
->
m_refid_mutex
);
rp
=
(
sev_sRefid
*
)
tree_Find
(
&
sts
,
sev
->
m_refid
,
&
rk
);
thread_MutexUnlock
(
&
sev
->
m_refid_mutex
);
if
(
!
rp
)
{
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
continue
;
...
...
sev/exe/sev_server/src/sev_server.h
View file @
cbf0c841
...
...
@@ -123,6 +123,7 @@ class sev_server {
pwr_tStatus
m_server_status
;
vector
<
sev_node
>
m_nodes
;
tree_sTable
*
m_refid
;
thread_sMutex
m_refid_mutex
;
unsigned
int
m_msg_id
;
sev_db
*
m_db
;
int
m_noneth
;
...
...
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