<h3>Contribution description</h3>
<p>Fixing the pthread reaper. The reaper takes less memory (same stacksize as Idle thread) and pthreads are created sleeping instead of <code>THREAD_CREATE_WOUT_YIELD</code>.</p>

<h3>Testing procedure</h3>
<p>Create a pthread without giving it a stack as attribute.<br>
Check with ps if reaper was created or turn on Debug and make sure the pthread exits (Debug message from pthread reaper when freeing the memory <code>DEBUG("pthread_reaper(): free(%p)\n", m.content.ptr);</code> ) .<br>
Before this fix the reaper was never created and the memory not freed.</p>

<h3>Issues/PRs references</h3>


<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/12285'>https://github.com/RIOT-OS/RIOT/pull/12285</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>sys/posix/pthread/pthread.c: Reaper fix</li>
  <li>sys/posix/pthread/pthread.c: check reaper creation</li>
  <li>sys/posix/pthread/pthread.c: create thread sleeping</li>
  <li>sys/posix/pthread/pthread.c: reduce pthread reaper size</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12285/files#diff-0">sys/posix/pthread/pthread.c</a>
    (20)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12285.patch'>https://github.com/RIOT-OS/RIOT/pull/12285.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12285.diff'>https://github.com/RIOT-OS/RIOT/pull/12285.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12285?email_source=notifications&email_token=ABE7WYEVXZO7SFR7YKKWT7TQKTGVVA5CNFSM4IYXFPL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMVZ3QA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBTXCHAE77XWMNDA5LQKTGVVANCNFSM4IYXFPLQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYA5MTITEX4D7YSETF3QKTGVVA5CNFSM4IYXFPL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMVZ3QA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12285?email_source=notifications\u0026email_token=ABE7WYEVXZO7SFR7YKKWT7TQKTGVVA5CNFSM4IYXFPL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMVZ3QA",
"url": "https://github.com/RIOT-OS/RIOT/pull/12285?email_source=notifications\u0026email_token=ABE7WYEVXZO7SFR7YKKWT7TQKTGVVA5CNFSM4IYXFPL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMVZ3QA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>