Valid contexts – Comtrol eCos User Manual
Page 54
Advertising
Per-thread data
never include the POSIX compatibility package then application code may instead decide to re-use the slot allo-
cated to that package,
CYGNUM_KERNEL_THREADS_DATA_POSIX
, but obviously this does involve a risk of strange
and subtle bugs if the application’s requirements ever change.
Valid contexts
Typically
cyg_thread_new_data_index
is only called during initialization, but may also be called at any time
in thread context.
cyg_thread_free_data_index
, if used at all, can also be called during initialization or from
thread context.
cyg_thread_get_data
,
cyg_thread_get_data_ptr
, and
cyg_thread_set_data
may only be
called from thread context because they implicitly operate on the current thread.
54
Advertising