소스 검색

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}