Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <process.h>
    void __far _endthread(void);

Description:
    The _endthread function uses the OS/2 function  DosExit to end the
    current thread of execution.

Returns:
    The _endthread function does not return any value.

See Also:
    _beginthread

Example:
    #include <stdio.h>
    #include <stdlib.h>
    #include <process.h>

    #define  STACK_SIZE   4096
    #if defined(__386__)
      #define FAR
    #else
      #define FAR __far
    #endif

    void FAR child( void FAR *parm )
      {
        char * FAR *argv = (char * FAR *) parm;
        int  i;

        for( i = 0; argv[i]; i++ ) {
          printf( "argv[%d] = %s\n", i, argv[i] );
        }
        _endthread();
      }

    void main()
      {
        char *stack;
        char *args[3];
        int   tid;

        args[0] = "child";
        args[1] = "parm";
        args[2] = NULL;
        stack = (char *) malloc( STACK_SIZE );
        tid = _beginthread( child, stack, STACK_SIZE, args );
      }

Classification:
    OS/2

Systems:
    OS/2 1.x(MT), OS/2 1.x(DL), OS/2 2.x, NT

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson