resmgr_context_free()
QNX SDP8.0C Library ReferenceAPIDeveloper
Free a resource-manager context
Synopsis:
#include <sys/iofunc.h>
#include <sys/dispatch.h>
void resmgr_context_free( resmgr_context_t * ctp );
Arguments:
- ctp
 - A pointer to the resmgr_context_t structure that you want to free.
 
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The resmgr_context_free() function frees a context allocated by resmgr_context_alloc().
Note: 
This function simply calls
dispatch_context_free().
Examples:
#include <sys/dispatch.h>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv ) {
   dispatch_t          *dpp;
   resmgr_context_t    *ctp;
   if ( (dpp = dispatch_create()) == NULL ) {
      fprintf( stderr, "%s: Unable to allocate \
               dispatch handle.\n",argv[0] );
      return EXIT_FAILURE;
   }
   …
   if ( ( ctp = resmgr_context_alloc ( dpp )) == NULL ) {
      fprintf( stderr, "Context wasn't allocated.\n" );
      return EXIT_FAILURE;
   }
   …
   resmgr_context_free ( ctp );
}
For examples using the dispatch interface, see dispatch_create(), message_attach(), resmgr_attach(), and thread_pool_create().
Classification:
| Safety: | |
|---|---|
| Cancellation point | Yes | 
| Signal handler | No | 
| Thread | Yes | 
Page updated: 
