mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Squashed commit of the following:
sched/sched: Correct some build issues introduced by last set of changes.
sched/sched: Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value. All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
sched/sched: Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value. Also renamed to nxsched_reprioritize() and sched_setpriority().
sched/sched: Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value. All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
sched/sched: Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value. All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
sched/sched: Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues). All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/paging/pg_miss.c
|
||||
*
|
||||
* Copyright (C) 2010, 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2010, 2017-2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -162,7 +162,7 @@ void pg_miss(void)
|
||||
|
||||
pginfo("New worker priority. %d->%d\n",
|
||||
wtcb->sched_priority, ftcb->sched_priority);
|
||||
sched_setpriority(wtcb, ftcb->sched_priority);
|
||||
(void)nxsched_setpriority(wtcb, ftcb->sched_priority);
|
||||
}
|
||||
|
||||
/* Signal the page fill worker thread.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sched/paging/pg_worker.c
|
||||
* Page fill worker thread implementation.
|
||||
*
|
||||
* Copyright (C) 2010-2011, 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2010-2011, 2017-2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/sched.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/signal.h>
|
||||
#include <nuttx/page.h>
|
||||
@@ -185,7 +186,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result)
|
||||
{
|
||||
pginfo("New worker priority. %d->%d\n",
|
||||
wtcb->sched_priority, priority);
|
||||
sched_setpriority(wtcb, priority);
|
||||
(void)nxsched_setpriority(wtcb, priority);
|
||||
}
|
||||
|
||||
/* Save the page fill result (don't permit the value -EBUSY) */
|
||||
@@ -296,7 +297,7 @@ static inline bool pg_dequeue(void)
|
||||
|
||||
pginfo("New worker priority. %d->%d\n",
|
||||
wtcb->sched_priority, priority);
|
||||
sched_setpriority(wtcb, priority);
|
||||
(void)nxsched_setpriority(wtcb, priority);
|
||||
}
|
||||
|
||||
/* Return with g_pftcb holding the pointer to
|
||||
@@ -458,7 +459,7 @@ static inline void pg_alldone(void)
|
||||
g_pftcb = NULL;
|
||||
pginfo("New worker priority. %d->%d\n",
|
||||
wtcb->sched_priority, CONFIG_PAGING_DEFPRIO);
|
||||
sched_setpriority(wtcb, CONFIG_PAGING_DEFPRIO);
|
||||
(void)nxsched_setpriority(wtcb, CONFIG_PAGING_DEFPRIO);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user