However, as I said, there are some things in the sem_t structure whose
usage is ubiquitous and I don't know if the scalar access macros will be
enough, i.e. I don't fully understand how they work / are supposed to work.
...

I believe that all of the lists and structures that you are concerned with are already allocated from  kernel space memory, but I have not verified that it all cases.  Certainly, they are things that would never be accessed from user space.  The user memory sem_t "container" just holds references to kernel space allocations.

If I am correct, then you should not have any problems.  But, as I said, I did not verify all of that.
I would say that, as a rule, nothing in user space should have any knowledge or access to the internals of a sem_t.  Looking at libs/libc/semaphore, I don't believe that there is any,.


Reply via email to