Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
4bf5c01f
Commit
4bf5c01f
authored
Jun 14, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small bugfixes
parent
d7088d90
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
17 deletions
+39
-17
cppa/detail/abstract_actor.hpp
cppa/detail/abstract_actor.hpp
+5
-0
cppa/util/single_reader_queue.hpp
cppa/util/single_reader_queue.hpp
+15
-1
src/group.cpp
src/group.cpp
+2
-10
src/process_information.cpp
src/process_information.cpp
+6
-6
src/uniform_type_info.cpp
src/uniform_type_info.cpp
+11
-0
No files found.
cppa/detail/abstract_actor.hpp
View file @
4bf5c01f
...
@@ -90,6 +90,11 @@ class abstract_actor /*[[base_check]]*/ : public Base
...
@@ -90,6 +90,11 @@ class abstract_actor /*[[base_check]]*/ : public Base
// lifetime scope of guard
// lifetime scope of guard
{
{
std
::
lock_guard
<
std
::
mutex
>
guard
(
m_mtx
);
std
::
lock_guard
<
std
::
mutex
>
guard
(
m_mtx
);
if
(
m_exit_reason
!=
exit_reason
::
not_exited
)
{
// already exited
return
;
}
m_exit_reason
=
reason
;
m_exit_reason
=
reason
;
mlinks
=
std
::
move
(
m_links
);
mlinks
=
std
::
move
(
m_links
);
mattachables
=
std
::
move
(
m_attachables
);
mattachables
=
std
::
move
(
m_attachables
);
...
...
cppa/util/single_reader_queue.hpp
View file @
4bf5c01f
...
@@ -107,7 +107,21 @@ class single_reader_queue
...
@@ -107,7 +107,21 @@ class single_reader_queue
return
!
m_head
&&
!
(
m_tail
.
load
());
return
!
m_head
&&
!
(
m_tail
.
load
());
}
}
single_reader_queue
()
:
m_tail
(
0
),
m_head
(
0
)
{
}
single_reader_queue
()
:
m_tail
(
nullptr
),
m_head
(
nullptr
)
{
}
~
single_reader_queue
()
{
fetch_new_data
();
element_type
*
e
=
m_head
;
while
(
e
)
{
element_type
*
tmp
=
e
;
e
=
e
->
next
;
delete
tmp
;
}
}
private:
private:
...
...
src/group.cpp
View file @
4bf5c01f
...
@@ -102,17 +102,9 @@ class local_group_module : public group::module
...
@@ -102,17 +102,9 @@ class local_group_module : public group::module
{
{
upgrade_guard
uguard
(
guard
);
upgrade_guard
uguard
(
guard
);
auto
p
=
m_instances
.
insert
(
std
::
make_pair
(
group_name
,
tmp
));
auto
p
=
m_instances
.
insert
(
std
::
make_pair
(
group_name
,
tmp
));
if
(
p
.
second
==
false
)
// someone might preempt us
{
// someone preempt us
return
p
.
first
->
second
;
return
p
.
first
->
second
;
}
}
else
{
// ok, inserted tmp
return
tmp
;
}
}
}
}
}
}
...
...
src/process_information.cpp
View file @
4bf5c01f
...
@@ -48,21 +48,21 @@ cppa::process_information compute_proc_info()
...
@@ -48,21 +48,21 @@ cppa::process_information compute_proc_info()
char
cbuf
[
100
];
char
cbuf
[
100
];
// fetch hd serial
// fetch hd serial
std
::
string
hd_serial
;
std
::
string
hd_serial
;
FILE
*
cmd
=
popen
(
s_get_uuid
,
"r"
);
FILE
*
get_uuid_
cmd
=
popen
(
s_get_uuid
,
"r"
);
while
(
fgets
(
cbuf
,
100
,
cmd
)
!=
0
)
while
(
fgets
(
cbuf
,
100
,
get_uuid_
cmd
)
!=
0
)
{
{
hd_serial
+=
cbuf
;
hd_serial
+=
cbuf
;
}
}
pclose
(
cmd
);
pclose
(
get_uuid_
cmd
);
erase_trailing_newline
(
hd_serial
);
erase_trailing_newline
(
hd_serial
);
// fetch mac address of first network device
// fetch mac address of first network device
std
::
string
first_mac_addr
;
std
::
string
first_mac_addr
;
cmd
=
popen
(
s_get_mac
,
"r"
);
FILE
*
get_mac_
cmd
=
popen
(
s_get_mac
,
"r"
);
while
(
fgets
(
cbuf
,
100
,
cmd
)
!=
0
)
while
(
fgets
(
cbuf
,
100
,
get_mac_
cmd
)
!=
0
)
{
{
first_mac_addr
+=
cbuf
;
first_mac_addr
+=
cbuf
;
}
}
pclose
(
cmd
);
pclose
(
get_mac_
cmd
);
erase_trailing_newline
(
first_mac_addr
);
erase_trailing_newline
(
first_mac_addr
);
result
.
node_id
=
cppa
::
util
::
ripemd_160
(
first_mac_addr
+
hd_serial
);
result
.
node_id
=
cppa
::
util
::
ripemd_160
(
first_mac_addr
+
hd_serial
);
//memcpy(result.node_id, tmp.data(), cppa::process_information::node_id_size);
//memcpy(result.node_id, tmp.data(), cppa::process_information::node_id_size);
...
...
src/uniform_type_info.cpp
View file @
4bf5c01f
...
@@ -611,6 +611,17 @@ class uniform_type_info_map
...
@@ -611,6 +611,17 @@ class uniform_type_info_map
insert
<
std
::
uint64_t
>
(
ints
[
sizeof
(
std
::
uint64_t
)].
second
);
insert
<
std
::
uint64_t
>
(
ints
[
sizeof
(
std
::
uint64_t
)].
second
);
}
}
~
uniform_type_info_map
()
{
m_by_rname
.
clear
();
for
(
auto
&
kvp
:
m_by_uname
)
{
delete
kvp
.
second
;
kvp
.
second
=
nullptr
;
}
m_by_uname
.
clear
();
}
uniform_type_info
*
by_raw_name
(
const
std
::
string
&
name
)
uniform_type_info
*
by_raw_name
(
const
std
::
string
&
name
)
{
{
auto
i
=
m_by_rname
.
find
(
name
);
auto
i
=
m_by_rname
.
find
(
name
);
...
...
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