Hello, I have been trying to get the pointer to the control block of a thread using the _Thread_Get() function for stack sharing using a shared-memory object, the implementation can be seen here <https://github.com/ur10/rtems/blob/Final_release/cpukit/posix/src/shmopen.c#L103>. The problem is when I use an operation to release/acquire a critical resource I get the fatal error "INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT". I suspect this is because the interrupts are disabled during object lookup and remain disabled if an object is found( although why it would cause the above error, that escapes me). Can someone please point out how should I use _Thread_Get() for my desired operation?
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel