Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 8
Destroy a dispatch handle
#include <sys/iofunc.h>
#include <sys/dispatch.h>
int dispatch_destroy( dispatch_t *dpp );
- dpp
- A dispatch handle created by
dispatch_create().
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The function dispatch_destroy() destroys
the given dispatch handle.
This function is part of the dispatch layer of a resource manager.
For more information, see
“Layers in a resource manager”
in the Bones of a Resource Manager chapter of Writing a Resource Manager.
- 0
- Success.
- -1
- An error occurred
(errno is set).
- EINVAL
- The dispatch handle, dpp, is invalid.
#include <sys/dispatch.h>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv ) {
dispatch_t *dpp;
int destroyed;
if( ( dpp = dispatch_create() ) == NULL ) {
fprintf( stderr, "%s: Unable to allocate \
dispatch handle.\n",argv[0] );
return EXIT_FAILURE;
}
…
if ( (destroyed = dispatch_destroy ( dpp )) == -1 ) {
fprintf ( stderr, "Dispatch wasn't destroyed, \
bad dispatch handle %d.\n", dpp);
return EXIT_FAILURE;
}
/* else dispatch was destroyed */
…
return EXIT_SUCCESS;
}
For examples using the dispatch interface, see
dispatch_create(),
message_attach(),
resmgr_attach(), and
thread_pool_create().
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
dispatch_create(),
dispatch_create_channel(),
For more information, see
“Layers in a resource manager”
in the Bones of a Resource Manager chapter of Writing a Resource Manager
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 175
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/dispatch_destroy.html on line 175