Skip to content

Replacing uintptr_t (which is not defined everywhere) with std::size_t#1981

Merged
sithhell merged 2 commits into
masterfrom
replace_uintptr
Feb 10, 2016
Merged

Replacing uintptr_t (which is not defined everywhere) with std::size_t#1981
sithhell merged 2 commits into
masterfrom
replace_uintptr

Conversation

@hkaiser
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser commented Feb 10, 2016

This cleans up the leftovers of #1969.

#if defined(HPX_HAVE_THREADS_GET_STACK_POINTER)
return
reinterpret_cast<uintptr_type>(stack_pointer_) - get_stack_ptr();
return get_stack_ptr() - reinterpret_cast<std::size_t>(stack_pointer_);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you switch the minuends. It should read:
reinterpret_cast<std::size_t>(stack_pointer_) - get_stack_ptr();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it consistent with the other implementations. Should this one be different?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was on purpose since the stack_pointer_ here points to the top of stack already, while the other ones point to the bottom.

sithhell added a commit that referenced this pull request Feb 10, 2016
Replacing uintptr_t (which is not defined everywhere) with std::size_t
@sithhell sithhell merged commit 8a3dd42 into master Feb 10, 2016
@sithhell sithhell deleted the replace_uintptr branch February 10, 2016 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants