Выделить память под блок открытого контекста iofunc
#include <sys/iofunc.h>iofunc_ocb_t * iofunc_ocb_calloc( resmgr_context_t *ctp,iofunc_attr_t *attr );
libc
The iofunc_ocb_calloc() function allocates an iofunc OCB. It has a number of uses:
![]() | 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_calloc() and iofunc_ocb_free() callouts in the attribute's mount structure, then you should use the callouts instead of calling the standard iofunc_ocb_calloc() and iofunc_ocb_free() functions. |
A pointer to an iofunc_ocb_t OCB structure.
Override iofunc_ocb_calloc() and iofunc_ocb_free() to manage an extended OCB:
typedef struct{iofunc_ocb_t iofuncOCB; /* the OCB used by iofunc_* */int myFlags;char moreOfMyStuff;} MyOCBT;MyOCBT *iofunc_ocb_calloc( resmgr_context_t *ctp, iofunc_attr_t *attr ){return ((MyOCBT *)calloc( 1, sizeof( MyOCBT ));}void iofunc_ocb_free (MyOCBT *ocb){free (ocb);}
ЗОСРВ «Нейтрино»
iofunc_ocb_free(), iofunc_ocb_t, resmgr_context_t
Предыдущий раздел: Описание API системной библиотеки