Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - combine messages and resource manager library callouts: (1 Item)
   
combine messages and resource manager library callouts  
i am implementing a resource manager and providing my open callback as below. When a client program issues a stat() call
, the documentation says that the resource manager library will issue the following series of callouts:

Client call: 
    stat() 
Message(s): 
   _IO_CONNECT_COMBINE_CLOSE , _IO_STAT 
Callouts: 
   io_open
   io_lock_ocb
   io_stat
   io_unlock_ocb
   io_close 

is my understanding correct that the above order is the order of callouts that will be issued by the resource manager 
library? in other words, io_open() shall be called first, followed by io_lock_ocb(), followed by io_stat(), and so on? 
Do I need to implement all of these methods, apart from io_open() and io_stat()?

if that is so, what should I expect in the following fields?
msg->connect.type
msg->connect.subtype
msg->connect.extra_type

Should I get an indication in io_open that this invocation of io_open() is for a _IO_STAT? maybe in the type field? as 
mentioned in iomsg.h (enum _io__Uint16types)?

What should the intervening functions like io_open, lock_ocb() return as a return value so that the resource manager 
library continues the series of calls into io_stat()

int io_open (resmgr_context_t *ctp, io_open_t *msg, RESMGR_HANDLE_T *handle, void *extra)
{
    // what should be the return value here provided I can determine here that this invocation is for a stat() call?
   // returning EOK here does not result in calling of io_stat() below....
}

int io_stat(resmgr_context_t *ctp, io_stat_t *msg, RESMGR_OCB_T *ocb)
{
}