As was also already noted in this post, the GIO documentation states that GIO channels must not be accessed from different tasks. However, I wonder if there are exceptions to this rule.
I would like to do all resource acquisition during an initialization phase, and ideally from within main or some startup task only. Obviously, resource acquisition includes allocating FVID buffers using the FVID_ALLOC_BUFFER ioctl.
Now I guess my question is whether it is safe to allocate the buffers in task A and then do all queuing/dequeuing in task B, if task A and task B are guaranteed not to interfere with each other by some external means (mutex, barrier, ...). More generally, are arbitrary accesses to a GIO channel from multiple tasks ok if mutual exclusion is guaranteed? Unless the GIO module really stores task-specific data (stack pointers, task id, thread-local storage, ...) I cannot think of a reason why that shouldn't work.
Thank you for your help
Kind regards
Markus Moll