Skip to content

Clarification about "Initialization" #27

Description

@acozz

Initialization is defined in Chapter 3: "Initialization includes all program execution between processor reset and the entry point of the thread scheduling loop." It is further defined later in the chapter.

In Chapter 4, each API lists which program execution types it is allowed to be called from. Many APIs will say they are valid from Initialization. However, Initialization is very broad. The most likely option is calling them from tx_application_define() where they will all assuredly work. But one could conceivably call these APIs during global and static initialization (C++ constructors) or in main() before calling tx_kernel_enter().

For example, I have observed that tx_timer_activate() is dependent on global state that will not be initialized if called before tx_kernel_enter(). The most likely outcome is a crash. I imagine other APIs are similar. Perhaps some do not have this restriction.

Can the documentation be improved to clarify this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions