osal_thread.h

Overview

Related Modules:

OSAL

Description:

Declares thread types and interfaces.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

OsalThreadParam

Describes thread parameters.

OsalThread

Describes a thread.

Macros

Macro Name and Value

Description

OSAL_DECLARE_THREAD(thread)   struct OsalThread thread

Defines a thread macro.

Typedefs

Typedef Name

Description

OsalThreadEntry) (void )

typedef int( 

Defines a thread callback function type.

Enumerations

Enumeration Name

Description

OSAL_THREAD_PRIORITY { OSAL_THREAD_PRI_LOW, OSAL_THREAD_PRI_DEFAULT, OSAL_THREAD_PRI_HIGH, OSAL_THREAD_PRI_HIGHEST }

Enumerates thread priorities.

Functions

Function Name

Description

OsalThreadCreate (struct OsalThread thread, OsalThreadEntry threadEntry, void entryPara)

int32_t 

Creates a thread.

OsalThreadStart (struct OsalThread thread, const struct OsalThreadParam param)

int32_t 

Starts a thread.

OsalThreadDestroy (struct OsalThread thread)

int32_t 

Destroys a thread.

OsalThreadSuspend (struct OsalThread thread)

int32_t 

Suspends a thread.

OsalThreadResume (struct OsalThread *thread)

int32_t 

Resumes a thread.