Skip to content

API prototype changes to address compiler warnings #36

@skliper

Description

@skliper

These areas of the OSAL API need clean up.

Task API:

  • OS_TaskCreate() stack pointer is declared const (read-only). By definition, stack space should not be read-only.
  • OS_TaskInstallDeleteHandler() takes a "void *" argument rather than a function pointer. This should be a function pointer.

Module API:

  • To be consistent with the other API's, a separate property structure should be defined for use with OS_ModuleInfo(). Currently this returns the internal OSAL "OS_module_record_t", while all other API's return a dedicated property object. This is necessary to allow the internal implementation of the OSAL to change in the future while preserving the public API types.
  • The types should be changed to use the "cpuaddr" type rather than uint32 where a memory address is stored (OS_module_address_t, OS_SymbolLookup())

General:

  • When passing character strings as input to functions these should preferably be declared as "const char *" whenever possible. This allows one to pass string literals into the function. Otherwise a warning may be generated if a literal is used for a parameter declared as "char *".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions