Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
1ed0cf75
Commit
1ed0cf75
authored
Jul 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more checking for this assert
parent
bdd472d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
Makefile
Makefile
+2
-2
src/core/thread_utils.h
src/core/thread_utils.h
+10
-1
No files found.
Makefile
View file @
1ed0cf75
...
...
@@ -81,8 +81,8 @@ else
endif
TOOLS_DIR
:=
./tools
TEST_DIR
:=
./test
TESTS_DIR
:=
./test/tests
TEST_DIR
:=
$(
abspath
./test
)
TESTS_DIR
:=
$(
abspath
./test/tests
)
GPP
:=
$(GCC_DIR)
/bin/g++
GCC
:=
$(GCC_DIR)
/bin/gcc
...
...
src/core/thread_utils.h
View file @
1ed0cf75
...
...
@@ -151,6 +151,9 @@ private:
struct
Storage
{
PerThreadSet
<
T
,
CtorArgs
...
>*
self
;
#ifndef NDEBUG
pthread_t
my_tid
;
#endif
T
val
;
};
...
...
@@ -164,6 +167,8 @@ private:
auto
*
self
=
s
->
self
;
LOCK_REGION
(
&
self
->
lock
);
assert
(
s
->
my_tid
==
pthread_self
());
// I assume this destructor gets called on the same thread
// that this data is bound to:
assert
(
self
->
map
.
count
(
pthread_self
()));
...
...
@@ -173,7 +178,11 @@ private:
}
template
<
int
...
S
>
Storage
*
make
(
impl
::
seq
<
S
...
>
)
{
return
new
Storage
{.
self
=
this
,
.
val
=
T
(
std
::
get
<
S
>
(
ctor_args
)...)
};
return
new
Storage
{.
self
=
this
,
#ifndef NDEBUG
.
my_tid
=
pthread_self
(),
#endif
.
val
=
T
(
std
::
get
<
S
>
(
ctor_args
)...)
};
}
public:
...
...
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