![]() |
![]() |
![]() |
Default handler for _IO_CONNECT messages
#include <sys/iofunc.h> int iofunc_open_default( resmgr_context_t *ctp, io_open_t *msg, iofunc_attr_t *attr, void *extra );
libc
The iofunc_open_default() function implements the default actions for the _IO_CONNECT message in a resource manager. The client's open mode is checked against the resources attributes to see if the resource can be opened in that mode (via iofunc_open()), an OCB is allocated (via iofunc_ocb_calloc()), the OCB is initialized (via iofunc_ocb_attach()), and finally, the newly-created OCB is bound to the request (via resmgr_open_bind()).
This function can be placed directly into the connect_funcs table passed to resmgr_attach(), at the open position. See the "Examples" section in the description of iofunc_open() for the skeleton outline of the functionality (the second example, where resmgr_attach() doesn't specify that the managed resource is a directory).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
iofunc_chmod_default(), iofunc_chown_default(), iofunc_close_dup_default(), iofunc_close_ocb_default(), iofunc_devctl_default(), iofunc_lock_default(), iofunc_lseek_default(), iofunc_mmap_default(), iofunc_open(), iofunc_pathconf_default(), iofunc_stat_default(), iofunc_time_update(), iofunc_unblock_default(), iofunc_utime_default(), resmgr_attach()
![]() |
![]() |
![]() |