This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +31
-23
lines changed Expand file tree Collapse file tree 3 files changed +31
-23
lines changed Original file line number Diff line number Diff line change @@ -135,17 +135,9 @@ else version (MinGW)
135
135
// /
136
136
alias __mingw_strtold strtold;
137
137
}
138
- else version (CRuntime_Bionic )
139
- {
140
- // /
141
- real strtold (scope inout (char )* nptr, scope inout (char )** endptr)
142
- { // Fake it again till we make it
143
- return strtod (nptr, endptr);
144
- }
145
- }
146
138
else
147
139
{
148
- // /
140
+ // / Added to Bionic since Lollipop.
149
141
real strtold (scope inout (char )* nptr, scope inout (char )** endptr);
150
142
}
151
143
Original file line number Diff line number Diff line change @@ -1056,37 +1056,40 @@ else version( CRuntime_Bionic )
1056
1056
size_t guard_size;
1057
1057
int sched_policy;
1058
1058
int sched_priority;
1059
- version (AArch64 ) char [16 ] __reserved;
1059
+ version (D_LP64 ) char [16 ] __reserved;
1060
1060
}
1061
1061
1062
1062
struct pthread_cond_t
1063
1063
{
1064
- int value; // volatile
1064
+ version (D_LP64 )
1065
+ int [12 ] __private;
1066
+ else
1067
+ int [1 ] __private;
1065
1068
}
1066
1069
1067
1070
alias c_long pthread_condattr_t ;
1068
1071
alias int pthread_key_t ;
1069
1072
1070
1073
struct pthread_mutex_t
1071
1074
{
1072
- int value; // volatile
1075
+ version (D_LP64 )
1076
+ int [10 ] __private;
1077
+ else
1078
+ int [1 ] __private;
1073
1079
}
1074
1080
1075
1081
alias c_long pthread_mutexattr_t ;
1076
- alias int pthread_once_t ; // volatile
1082
+ alias int pthread_once_t ;
1077
1083
1078
1084
struct pthread_rwlock_t
1079
1085
{
1080
- pthread_mutex_t lock;
1081
- pthread_cond_t cond;
1082
- int numLocks;
1083
- int writerThreadId;
1084
- int pendingReaders;
1085
- int pendingWriters;
1086
- void * [4 ] reserved;
1086
+ version (D_LP64 )
1087
+ int [14 ] __private;
1088
+ else
1089
+ int [10 ] __private;
1087
1090
}
1088
1091
1089
- alias int pthread_rwlockattr_t ;
1092
+ alias c_long pthread_rwlockattr_t ;
1090
1093
alias c_long pthread_t ;
1091
1094
}
1092
1095
else version ( CRuntime_UClibc )
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ void initSections() nothrow @nogc
69
69
70
70
auto pbeg = cast (void * )&_tlsend;
71
71
auto pend = cast (void * )&__bss_end__;
72
+ // _tlsend is a 32-bit int and may not be 64-bit void*-aligned, so align pbeg.
73
+ version (D_LP64 ) pbeg = cast (void * )(cast (size_t )(pbeg + 7 ) & ~ cast (size_t )7 );
72
74
_sections._gcRanges[0 ] = pbeg[0 .. pend - pbeg];
73
75
}
74
76
@@ -129,6 +131,17 @@ else version(ARM)
129
131
return tls.ptr + offset;
130
132
}
131
133
}
134
+ else version (AArch64 )
135
+ {
136
+ extern (C ) void * __tls_get_addr( void * p ) nothrow @nogc
137
+ {
138
+ debug (PRINTF ) printf(" __tls_get_addr input - %p\n " , p);
139
+ immutable offset = cast (size_t )(p - cast (void * )&_tlsstart);
140
+ auto tls = getTLSBlockAlloc();
141
+ assert (offset < tls.length);
142
+ return tls.ptr + offset;
143
+ }
144
+ }
132
145
else
133
146
static assert ( false , " Android architecture not supported." );
134
147
@@ -182,7 +195,7 @@ extern(C)
182
195
183
196
size_t __bss_end__;
184
197
185
- void * _tlsstart;
186
- void * _tlsend;
198
+ int _tlsstart;
199
+ int _tlsend;
187
200
}
188
201
}
You can’t perform that action at this time.
0 commit comments