New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: Thread:pthread_attr_destroy(thread_attr) when done with it #6325

Merged
2 commits merged into from Oct 20, 2015

Conversation

Projects
None yet
3 participants
@ghost

ghost commented Oct 20, 2015

branch-predictor and others added some commits Jul 17, 2015

Thread.cc: remove malloc/free pair
There's no need for mallocing pthread_attr_t in Thread::try_create(),
it can be located on stack as it is freed in same function. This reduces
pressure put on memory manager.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
(cherry picked from commit 614ac0f)
Common/Thread: pthread_attr_destroy(thread_attr) when done with it
When a thread attributes object is no longer required, it should be destroyed using the
pthread_attr_destroy() function. Destroying a thread attributes object has no effect on threads that were created using that object.

Fixes: #12570
Signed-off-by: zqkqkz zheng.qiankun@h3c.com
(cherry picked from commit 9471bb8)

@ghost ghost self-assigned this Oct 20, 2015

@ghost ghost added this to the firefly milestone Oct 20, 2015

@ghost ghost added bug fix core labels Oct 20, 2015

ghost pushed a commit that referenced this pull request Oct 20, 2015

Merge pull request #6325: common/Thread:pthread_attr_destroy(thread_a…
…ttr) when done with it

Reviewed-by: Loic Dachary <ldachary@redhat.com>

ghost pushed a commit that referenced this pull request Oct 20, 2015

Loic Dachary
Merge pull request #6325 from dachary/wip-13041-firefly
common/Thread:pthread_attr_destroy(thread_attr) when done with it

Reviewed-by: Loic Dachary <ldachary@redhat.com>

@ghost ghost merged commit f275ad2 into ceph:firefly Oct 20, 2015

@ghost ghost changed the title from common/Thread:pthread_attr_destroy(thread_attr) when done with it to common: Thread:pthread_attr_destroy(thread_attr) when done with it Oct 24, 2015

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment