Skip to content

Commit f70fd22

Browse files
[sgen] Remove two dead fields; fix wasm-mt AOT compilation (#75511)
They were only initialized, but never read. But what they did do is change the SgenClientInfo field offsets between the threaded and non-threaded wasm runtimes (because emscripten only has HAVE_PTHREAD_KILL in the threaded build). As a result the offsets for tlab_start, tlab_next and tlab_temp_end were different for the AOT compilers targeting threaded vs non-threaded WASM. This PR removes the two unused fields which will make the two wasm configurations match again, allowing us to ship a single AOT cross compiler for both threaded and non-threaded wasm. Co-authored-by: Aleksey Kliger <aleksey@lambdageek.org>
1 parent 2cbaca1 commit f70fd22

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

src/mono/mono/metadata/sgen-client-mono.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ struct _SgenClientThreadInfo {
4040
gboolean skip, suspend_done;
4141
volatile int in_critical_region;
4242

43-
#ifdef SGEN_POSIX_STW
44-
/* This is -1 until the first suspend. */
45-
int signal;
46-
/* FIXME: kill this, we only use signals on systems that have rt-posix, which doesn't have issues with duplicates. */
47-
unsigned int stop_count; /* to catch duplicate signals. */
48-
#endif
49-
5043
gpointer runtime_data;
5144

5245
void *stack_end;

src/mono/mono/metadata/sgen-mono.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,11 +2153,6 @@ sgen_client_thread_attach (SgenThreadInfo* info)
21532153

21542154
info->client_info.stack_start = NULL;
21552155

2156-
#ifdef SGEN_POSIX_STW
2157-
info->client_info.stop_count = -1;
2158-
info->client_info.signal = 0;
2159-
#endif
2160-
21612156
memset (&info->client_info.ctx, 0, sizeof (MonoContext));
21622157

21632158
if (mono_gc_get_gc_callbacks ()->thread_attach_func)

src/mono/mono/sgen/sgen-gc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ typedef enum {
5151

5252
NurseryClearPolicy sgen_get_nursery_clear_policy (void);
5353

54-
#if !defined(__MACH__) && !MONO_MACH_ARCH_SUPPORTED && defined(HAVE_PTHREAD_KILL)
55-
#define SGEN_POSIX_STW 1
56-
#endif
57-
5854
/*
5955
* The nursery section uses this struct.
6056
*/

0 commit comments

Comments
 (0)