RTFW_SCHEDULED_PROCESS

RTFW_SCHEDULED_PROCESS is a structure that holds the data fields for a single scheduled process.

Syntax

Copy
typedef struct _RTFW_SCHEDULED_PROCESS(
    size_t         Size
    CHAR           Filename[MAX_PATH],
    CHAR           Parameters[MAX_PATH],
    bool           Reserved,
    unsigned int   IdealProcessor,
    uint64_t       AffinityMask,
    RTFW_SCHEDULED_ID  ScheduledID,
    uint32_t       MSpaceInitialSize,
    uint32_t       MSpaceExpandSize,
    bool           AllocateExtMSpaceAtStartup
} RTFW_SCHEDULED_PROCESS, * PRTFW_SCHEDULED_PROCESS;

Members

Size

This field must always be set to the size of the structure before passing it into a function. If not set, the calling function returns FALSE, and the last error is set to RT_ERROR_STRUCTURE_TOO_SMALL.

Filename[MAX_PATH]

The file name or full path name of the scheduled process. If only one file name is used, it will be validated against the current list of directories within the wRTOS SearchPath. If no file is found within the search path directories, this structure will be rejected with either ERROR_BAD_PATH or ERROR_FILE_NOT_FOUND.

Parameters[MAX_PATH] (Optional)

Contains the parameters that the process will be launched with. No validation is done for this field.

IdealProcessor

Specifies the ideal processor for the scheduled process. If 0, it will use the first available processor. If an invalid processor is given, error INVALID PARAM is returned. Use #define RTFW_DEFAULT_RTSS_PROCESSOR UINT_MAX in RtfwApi.h to use the parent thread’s ideal processor or the system default value from wRTOS Settings.

AffinityMask

Specifies the Process Affinity Mask. If 0, it will default to the Subsystem Affinity Mask. If non-zero, it must share at least 1 processor in common with the Subsystem Affinity mask. If an invalid affinity mask is given, error INVALID PARAM is returned.

ScheduledID

Specifies a unique identifier for a scheduled process, written to the structure when you call a create or get function with this structure. This field is used to identify scheduled processes for modification and deletion.

MSpaceInitialSize

Specifies the size, in kilobytes, by which to allocate non-Paged memory from Windows into the local memory MSpace at process startup. This value must be within the range 64 KB to 4,194,292 KB.

MSpaceExpandSize

Specifies the size, in kilobytes, by which to expand an RTSS processes' internal/external MSpaces. This value must be within the range 64 KB to 4,194,292 KB.

AllocateExtMSpaceAtStartup

Specifies whether this process will allocate the process external MSpace at process start. When TRUE, the process external MSpace will start at process start. When FALSE, the process external MSpace will start at the first memory request.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtfwApi.h

RtfwApi.lib

See Also: