LM_GetThread
Retrieves information about the thread it’s running from.Function Signature
Parameters
A pointer to the
lm_thread_t structure that will be populated with information about the current thread, specifically the thread ID (tid) and the process ID (owner_pid).Return Value
Returns
LM_TRUE if the thread information was successfully retrieved and stored in the provided lm_thread_t structure. Otherwise, returns LM_FALSE.Example
LM_GetThreadEx
Retrieves information about a thread in a process.Function Signature
Parameters
The process that the thread will be retrieved from.
A pointer to the
lm_thread_t variable where the function will store the thread information retrieved from the process.Return Value
Returns
LM_TRUE if the thread was retrieved successfully, or LM_FALSE if it fails.Example
LM_GetThreadProcess
Retrieves the process that owns a given thread.Function Signature
Parameters
The thread whose process will be retrieved.
A pointer to the
lm_process_t structure where the function will store the process information related to the given thread.Return Value
Returns
LM_TRUE if the operation was successful or LM_FALSE otherwise.Example
Thread Structure
Thelm_thread_t structure contains information about a thread:
Fields
The thread identifier (TID). This is a unique identifier for the thread within the system.
The process identifier (PID) of the process that owns this thread.
Related Types
lm_tid_t- Thread identifier type (typedef ofuint32_t)lm_pid_t- Process identifier type (typedef ofuint32_t)