浏览代码

Linux mutex: restored the __m_kind field

This particular field is at the same offset on all architectures with the same
bit width, and is guaranteed by glibc to remain at this offset for backward
compatibility with static initialisers.

Resolves #40021
Jonas Maebe 2 年之前
父节点
当前提交
88ae6721c6
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      rtl/linux/pmutext.inc

+ 6 - 0
rtl/linux/pmutext.inc

@@ -37,6 +37,12 @@
       1 : (
              __align : sizeint;
           );
+      2 : (
+             pad1, pad2, pad3 {$ifdef cpu64}, pad4{$endif}: longint;
+             { this field is guaranteed to stay at this offset by glibc for
+               binary compatibility with static initialisers }
+             __m_kind: longint;
+          );
   end;
 
 {$ifdef __SIZEOF_PTHREAD_MUTEX_T}