SysLink API Reference  2.21.03.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
SysLink.h File Reference

Detailed Description

This module contains common definitions, types, structures and functions used by SysLink.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Void SysLink_setup (Void)
 Function to initialize SysLink.
Void SysLink_destroy (Void)
 Function to finalize SysLink.

Variables

String SysLink_params
 Config params override strings.

Function Documentation

Void SysLink_setup ( Void  )

Function to initialize SysLink.

This function must be called in every user process before making calls to any other SysLink APIs.

Remarks:
On Linux, SysLink is composed of many underlying sub-modules, each with its own entry in the /dev filesystem. SysLink_setup() (or, more precisely, other "setup" functions called by SysLink_setup()) will open each of these /dev files. Because these /dev files are created by a user-level system process named 'udev', a user's SysLink application can "race" against 'udev' and encounter the /dev 'open()' call before 'udev' has had a chance to create the /dev file. Typically, this behavior happens when the SysLink user application is executed immediately after SysLink's kernel module (syslink.ko) is installed in the system with 'insmod' or 'modprobe'.

To accommodate the above potential race condition, each /dev file 'open' is performed in a loop with a 1 ms sleep in between each 'open' attempt. The loop will occur a maximum of 100 times before reporting the failure to open the /dev file. Since SysLink_setup() is of a 'void' return type, it can't report this error back to the application, and instead it prints failure messages to 'stderr'.

See also:
SysLink_destroy()
Void SysLink_destroy ( Void  )

Function to finalize SysLink.

This function must be called in every user process at the end after all usage of SysLink in that process is complete.

See also:
SysLink_setup()

Variable Documentation

String SysLink_params

Config params override strings.

This string is a list of semi-colon-delimited "assignments" that can be set by users prior to the initial call to SysLink_setup() to affect system behavior.

Example assignments include:

  • "ProcMgr.proc[DSP].mmuEnable=FALSE;"
  • "ProcMgr.proc[VPSS-M3].mmuEnable=TRUE;"
  • "SharedRegion.entry[1].cacheEnable=FALSE;"
  • "SharedRegion.entry[3].cacheEnable=FALSE;"
Remarks:
Note that many users don't explicitly set this string and rebuild their app, but rather leverage the SL_PARAMS environment variable to set this string's value.
In many systems, slaveloader (or similar) is used to load and start the slaves, and is therefore the initial app in the system. In those systems, it's important to set this variable (or SL_PARAMS) prior to running slaveloader.
A common mistake is to forget to terminate the string with a trailing semi-colon.
Copyright 2014, Texas Instruments Incorporated