SchedCtl(), SchedCtl_r()

QNX SDP8.0C Library ReferenceAPIDeveloper

Control the scheduler

Synopsis:

#include <sys/neutrino.h>

int SchedCtl( int cmd,
              void *data,
              size_t length);

int SchedCtl_r( int cmd,
                void *data,
                size_t length);

Arguments:

cmd
The control command that you want to execute; one of:
  • SCHED_PROCESSOR_ONLINE
  • SCHED_PROCESSOR_OFFLINE
CAUTION:
The SCHED_PROCESSOR_ONLINE and SCHED_PROCESSOR_OFFLINE commands are part of Dynamic Processor State Management, an experimental feature of QNX OS. For additional details, contact QNX Customer Support.
data
A pointer to the specific data structure for the command.
length
The size of the structure that data points to.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The SchedCtl() and SchedCtl_r() kernel calls control the scheduler. These functions are identical except in the way they indicate errors; refer to the Returns section for details.

Returns:

The difference between these functions is how they indicate errors:
SchedCtl()
0 if the call succeeds. If an error occurs, SchedCtl() returns -1 and sets errno.
SchedCtl_r()
EOK is returned on success. This function does NOT set errno. If an error occurs, any of the error codes listed in the command descriptions above may be returned.

Classification:

QNX OS

Safety:
Cancellation point No
Signal handler Yes
Thread Yes
Page updated: