i create a resource manager with thread pool.
but i found a problem with this resource manager X
when processA open X, and excute i/o operation, such as my_write(…)
when processA is blocked by my_write(), processB can’t open X until my_write(…) returns.
so i rewrite my_write() as following
iofunc_attr_unlock(ocb->attr); <--new added
iofunc_attr_lock(ocb->attr); <--new added
now processB can open X when processA is blocked.
why it can works? where ocb->attr is locked?
second questionï¼š i tried to use sopen() to let two process to share X, but it seems do not work, processB still blocked. why?