Changeset da27e96 in rtems


Ignore:
Timestamp:
Aug 5, 2020, 7:19:20 AM (3 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
2b1a4ac
Parents:
0b410b8a
git-author:
Sebastian Huber <sebastian.huber@…> (08/05/20 07:19:20)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/18/20 17:38:24)
Message:

score: Document _Scheduler_Try_to_schedule_node()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/schedulerimpl.h

    r0b410b8a rda27e96  
    957957}
    958958
     959/**
     960 * @brief This enumeration defines what a scheduler should do with a node which
     961 * could be scheduled.
     962 */
    959963typedef enum {
    960964  SCHEDULER_TRY_TO_SCHEDULE_DO_SCHEDULE,
     
    964968
    965969/**
    966  * @brief Tries to schedule this scheduler node.
    967  *
    968  * @param context The scheduler instance context.
    969  * @param[in, out] node The node which wants to get scheduled.
    970  * @param idle A potential idle thread used by a potential victim node.
    971  * @param get_idle_thread Function to get an idle thread.
    972  *
    973  * @retval true This node can be scheduled.
    974  * @retval false This node cannot be scheduled.
     970 * @brief Tries to schedule the scheduler node.
     971 *
     972 * When a scheduler needs to schedule a node, it shall use this function to
     973 * determine what it shall do with the node.  The node replaces a victim node if
     974 * it can be scheduled.
     975 *
     976 * This function uses the state of the node and the scheduler state of the owner
     977 * thread to determine what shall be done.  Each scheduler maintains its nodes
     978 * independent of other schedulers.  This function ensures that a thread is
     979 * scheduled by at most one scheduler.  If a node requires an executing thread
     980 * due to some locking protocol and the owner thread is already scheduled by
     981 * another scheduler, then an idle thread shall be attached to the node.
     982 *
     983 * @param[in, out] context is the scheduler context.
     984 * @param[in, out] node is the node which could be scheduled.
     985 * @param idle is an idle thread used by the victim node or NULL.
     986 * @param get_idle_thread points to a function to get an idle thread.
     987 *
     988 * @retval SCHEDULER_TRY_TO_SCHEDULE_DO_SCHEDULE The node shall be scheduled.
     989 *
     990 * @retval SCHEDULER_TRY_TO_SCHEDULE_DO_IDLE_EXCHANGE The node shall be
     991 *   scheduled and the provided idle thread shall be attached to the node.  This
     992 *   action is returned, if the node cannot use the owner thread and shall use
     993 *   an idle thread instead.  In this case, the idle thread is provided by the
     994 *   victim node.
     995 *
     996 * @retval SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK The node shall be blocked.  This
     997 *   action is returned, if the owner thread is already scheduled by another
     998 *   scheduler.
    975999 */
    9761000RTEMS_INLINE_ROUTINE Scheduler_Try_to_schedule_action
     
    9781002  Scheduler_Context         *context,
    9791003  Scheduler_Node            *node,
    980   Thread_Control            *idle,
     1004  const Thread_Control      *idle,
    9811005  Scheduler_Get_idle_thread  get_idle_thread
    9821006)
Note: See TracChangeset for help on using the changeset viewer.