srv_termproc

Description

Terminate the execution of a thread.

Syntax

CS_RETCODE srv_termproc(spp)
SRV_PROC       *spp;

Parameters

spp

A pointer to an internal thread control structure.

Returns

Table 3-139:  Return values (srv_termproc)

Returns

To indicate

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Examples

Example 1

#include          <ospublic.h>
/*
 ** Local Prototype.
 */
CS_RETCODE         ex_srv_termproc PROTOTYPE((
SRV_PROC           *spp
));

/* 
 ** EX_SRV_TERMPROC
**
**   Example routine to terminate the execution of a thread using
 **   srv_termproc.
**
** Arguments:
**   spp    A pointer to an internal thread control structure.
** Returns:
**
**    CS_SUCCEED    Thread successfully terminated
**    CS_FAIL       An error was detected.
 */
CS_RETCODE          ex_srv_termproc(spp)
SRV_PROC            *spp;
{
      /*
       ** Terminate the thread.
       */
      if (srv_termproc(spp) != CS_SUCCEED)
      {
              return(CS_FAIL);
      }
      return(CS_SUCCEED);
}

Usage

See also

srv_createproc, srv_event, srv_event_deferred, srv_spawn