Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

OSSchedRoundRobinCfg() is used to enable or disable round-robin scheduling.

Files

os.h/os_core.c

Prototype

Code Block
void  OSSchedRoundRobinCfg (CPU_BOOLEAN   en,

...


                            OS_TICK       dflt_time_quanta,

...


                            OS_ERR       *p_err)

...

File

...

...

Code enabled by

...

os_core.c

...

Task or startup code

...

OS_CFG_SCHED_ROUND_ROBIN_EN

OSSchedRoundRobinCfg() is used to enable or disable round-robin scheduling.

Arguments

en

when set to DEF_ENABLED enables round-robin scheduling, and when set to DEF_DISABLED disables it.

...

is a pointer to a variable that is used to hold an error code:

OS_ERR_NONE

if If the call is successful.

Returned Value

None

Required Configuration

OS_CFG_SCHED_ROUND_ROBIN_EN must be enabled in os_cfg.h. Refer to µC-OS-III Configuration Manual.

Callers

Application.

Notes/Warnings

None

Example Usage

Code Block
titleOSSchedRoundRobinCfg() example usage
          void main (void)
          {
              OS_ERR  err;
           
           
              :
              OSInit(&err);                 /* Initialize µC/OS-III             */
              :  
              :
              OSSchedRoundRobinCfg(DEF_ENABLED,
                                   10,
                                   &err);    
              /* Check "err" */
              :
              :
              OSStart(&err);                /* Start Multitasking              */
          }