nuttx: replace getpid() with nxsched_getpid() in kernel code

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-07-07 12:41:46 +03:00 committed by Alan Carvalho de Assis
parent 2ca40e14e9
commit 3fe371f60f
2 changed files with 4 additions and 4 deletions

View File

@ -29,8 +29,8 @@
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include <unistd.h>
#include <nuttx/sched.h>
#include <nuttx/net/netlink.h>
#include "netlink.h"
@ -129,7 +129,7 @@ static int validate_nla(FAR const struct nlattr *nla, int maxtype,
if (g_nla_attr_len[pt->type] && attrlen != g_nla_attr_len[pt->type])
{
nwarn("netlink: '%d': attribute type %d has an invalid length.\n",
getpid(), type);
nxsched_getpid(), type);
return -EINVAL;
}
@ -324,7 +324,7 @@ int nla_parse(FAR struct nlattr **tb, int maxtype,
if (rem > 0)
{
nwarn("netlink: %d bytes leftover after parsing attributes in "
"pid `%d'.\n", rem, getpid());
"pid `%d'.\n", rem, nxsched_getpid());
}
errout:

View File

@ -88,7 +88,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
* ourself.
*/
if ((pid_t)thread == gettid())
if ((pid_t)thread == nxsched_gettid())
{
leave_cancellation_point();
return EDEADLK;