<h3>Contribution description</h3>
<p>The priority type in <code>thread_create</code> is now consistent with the <code>struct _thread </code>.</p>

<h3>Testing procedure</h3>
<p>Create a thread with a priority of -1:</p>
<pre><code>main(): This is RIOT! (Version: 2019.10-devel-445-g1d16b-pr/core/thread/hotfix_prio_type)
        pid | name                 | state    Q | pri | stack  ( used) | base addr  | current     
          - | isr_stack            | -        - |   - |   8192 (   -1) | 0x565a9400 | 0x565a9400
          1 | idle                 | pending  Q |  15 |   8192 (  420) | 0x565a7120 | 0x565a8f90 
          2 | main                 | running  Q |   7 |  12288 ( 2556) | 0x565a4120 | 0x565a6f90 
          3 | nr2                  | sleeping _ | 255 |  12288 (  420) | 0x565a1120 | 0x565a3f90 
            | SUM 
</code></pre>
<p>After fix it it returns <code>-EINVAL</code> and does not create a thread.</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/12203'>https://github.com/RIOT-OS/RIOT/pull/12203</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>core/thread.c: thread_create fix priority type</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12203/files#diff-0">core/include/thread.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12203/files#diff-1">core/thread.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12203.patch'>https://github.com/RIOT-OS/RIOT/pull/12203.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12203.diff'>https://github.com/RIOT-OS/RIOT/pull/12203.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/12203?email_source=notifications&email_token=ABE7WYHPMUHHXC3VQLYVHBLQJELGBA5CNFSM4IVWDSEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKYPSVA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYEHJQNURW5JHAHZ6VTQJELGBANCNFSM4IVWDSEA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYGKBTQVBVWIXEZUIF3QJELGBA5CNFSM4IVWDSEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKYPSVA.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/12203?email_source=notifications\u0026email_token=ABE7WYHPMUHHXC3VQLYVHBLQJELGBA5CNFSM4IVWDSEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKYPSVA",
"url": "https://github.com/RIOT-OS/RIOT/pull/12203?email_source=notifications\u0026email_token=ABE7WYHPMUHHXC3VQLYVHBLQJELGBA5CNFSM4IVWDSEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKYPSVA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>