gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079744696


##########
drivers/misc/optee.h:
##########
@@ -44,8 +46,17 @@
  * Public Types
  ****************************************************************************/
 
+struct optee_shm_entry
+{
+  struct list_node node;
+  struct tee_ioctl_shm_register_data shm;
+};
+
 struct optee_priv_data
 {
+  uintptr_t alignment;        /* Transport-specified message alignment */
+  struct list_node shm_list;  /* A list of all shm registered */
+  rmutex_t lock;              /* Mutex used to guard list accesses */

Review Comment:
   We would need to resolve the recursion to do that. The only (somewhat) 
reasonable way I can think of is to give up thread-safety for 
`optee_shm_free()`, and delegate responsibility to synchronize to the caller, 
which I considered sub-optimal, and prone-to-error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to