Jinoh Kang (@iamahuman) commented about dlls/win32u/winstation.c:
+struct shared_session +{
- LONG ref;
- UINT64 id;
- UINT object_capacity;
- const session_shm_t *shared;
+};
+static pthread_mutex_t session_lock = PTHREAD_MUTEX_INITIALIZER; +static struct shared_session *shared_session;
+static struct session_thread_data *get_session_thread_data(void) +{
- struct user_thread_info *thread_info = get_user_thread_info();
- if (!thread_info->session_data) thread_info->session_data = calloc(1, sizeof(struct session_thread_data));
(nit) Repeated type not kept in sync: changing type name of `session_data` leads to allocation of different types (and possibly size).
```suggestion:-0+0 if (!thread_info->session_data) thread_info->session_data = calloc(1, sizeof(*thread_info->session_data)); ```