eyBuildLib API Reference : eyBuildLib

ebthread

NAME

ebthread - multi-threads library

ROUTINES

ebThreadCreate( ) - create a new thread
ebThreadExit( ) - terminate a thread.
ebThreadWait( ) - waits for thread termination

DESCRIPTION

This library supplys routines for create/terminate multi-threads.

This library support Win32, POSIX OS and VxWorks.

INCLUDE

ebthread.h


eyBuildLib : Routines

ebThreadCreate( )

NAME

ebThreadCreate( ) - create a new thread

SYNOPSIS

int ebThreadCreate
    (
    EBTHREAD_ID *   ptid,     /* to return thread id */
    EBTHREAD_ATTR * pattr,    /* thread attribute */
    EBCALLBACK      callback, /* callback routine */
    void *          arg1,
    void *          arg2,
    void *          arg3,
    void *          arg4,
    void *          arg5
    )

DESCRIPTION

This routine is to create a new thread. The ptid is to return thread ID. If pattr is NULL, the default attribute is used, it means user need call ebThreadWait( ) wait for thread termination. if the pattr->attached is set TRUE, user should call ebThreadWait( ) wait for thread termination.

RETURNS

OK, or a non-zero error code.

SEE ALSO

ebthread


eyBuildLib : Routines

ebThreadExit( )

NAME

ebThreadExit( ) - terminate a thread.

SYNOPSIS

void ebThreadExit (void)

DESCRIPTION

This routine is to terminate a thread.

RETURNS

no return value.

SEE ALSO

ebthread


eyBuildLib : Routines

ebThreadWait( )

NAME

ebThreadWait( ) - waits for thread termination

SYNOPSIS

int ebThreadWait
    (
    EBTHREAD_ID * ptid
    )

DESCRIPTION

This routine waits for thread termination which created by ebThreadCreate( ).

RETURNS

OK, or a non-zero error code.

SEE ALSO

ebthread