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/i/iofunc_ocb_free.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/i/iofunc_ocb_free.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/i/iofunc_ocb_free.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/i/iofunc_ocb_free.html on line 8

iofunc_ocb_free()

Deallocate an iofunc Open Control Block's memory

Synopsis:

#include <sys/iofunc.h>

void iofunc_ocb_free( iofunc_ocb_t * ocb );

Arguments:

ocb
A pointer to the iofunc_ocb_t structure for the Open Control Block that was created when the client opened the resource.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The iofunc_ocb_free() function returns the memory allocated to an iofunc OCB to the free store pool. This function is the complement of iofunc_ocb_calloc().

If you've overridden the definition of iofunc_ocb_calloc(), you should also override the definition of iofunc_ocb_free() to correctly handle the release of the memory. This is because the iofunc_ocb_calloc() functions uses an internal memory management function to allocate the memory, and the default iofunc_ocb_free() function also uses this internal function to deallocate memory. Therefore, you can't mix internal memory management functions (_scalloc() and _sfree()) with user-level memory management functions (calloc() and free()).


Note: You should fill in the attribute's mount structure (i.e. the attr->mount pointer) instead of replacing this function.

If you specify iofunc_ocb_free() and iofunc_ocb_calloc() callouts in the attribute's mount structure, then you should use the callouts instead of calling the standard iofunc_ocb_free() and iofunc_ocb_calloc() functions.


Examples:

See iofunc_ocb_calloc().

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

iofunc_close_ocb(), iofunc_ocb_calloc(), iofunc_ocb_t

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/i/iofunc_ocb_free.html on line 143

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/i/iofunc_ocb_free.html on line 143