Skip to content

Commit 0f9d8d7

Browse files
committed
feedback
1 parent 16201cc commit 0f9d8d7

File tree

6 files changed

+8
-14
lines changed

6 files changed

+8
-14
lines changed

ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ See docs/process.md for more on how version tagging works.
2222
------
2323
- The version of musl libc used by emscripten was upgraded from v1.1.15 to
2424
v1.2.2. There could be some minor size regressions (or gains) due to changes
25-
in upstream musl code be we don't expect anything major. Since this fairly
25+
in upstream musl code but we don't expect anything major. Since this fairly
2626
change (at least internally) we are bumping the major version of emscripten
2727
to 3. (#13006)
2828

system/lib/libc/musl/include/threads.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ typedef void (*tss_dtor_t)(void *);
2020
#define __NEED_cnd_t
2121
#define __NEED_mtx_t
2222

23-
// XXX Emscripten: Fix musl libc issue, where the above defines are wrong, but instead should be the following: (https://github.com/emscripten-core/emscripten/issues/5343)
24-
#define __NEED_pthread_cond_t
25-
#define __NEED_pthread_mutex_t
26-
// XXX
27-
2823
#include <bits/alltypes.h>
2924

3025
#define TSS_DTOR_ITERATIONS 4

system/lib/libc/musl/src/locale/newlocale.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ static locale_t do_newlocale(int mask, const char *name, locale_t loc)
5454
return &default_ctype_locale;
5555

5656
/* If no builtin locale matched, attempt to allocate and copy. */
57-
/* XXX EMSCRIPTEN .. */
58-
/*if ((loc = malloc(sizeof *loc))) *loc = tmp;*/
59-
6057
if ((loc = malloc(sizeof *loc))) *loc = tmp;
6158

6259
return loc;

system/lib/libc/musl/src/stat/fstatat.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
#include "syscall.h"
99
#include "kstat.h"
1010

11-
/* XXX Emscripten: we ensure kstat == stat so we can simply make the syscall
12-
* without the extra copy */
11+
/* XXX Emscripten: We #define kstat to stat so we can simply make the syscall
12+
* without the extra copy.
13+
* See arch/emscripten/kstat.h
14+
*/
1315
#ifndef __EMSCRIPTEN__
1416
struct statx {
1517
uint32_t stx_mask;
@@ -139,6 +141,7 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict st, int fla
139141
{
140142
int ret;
141143
#ifdef __EMSCRIPTEN__
144+
// some logic here copied from fstatat_kstat above
142145
if (flag==AT_EMPTY_PATH && fd>=0 && !*path)
143146
ret = __syscall(SYS_fstat, fd, st);
144147
else if ((fd == AT_FDCWD || *path=='/') && !flag)

system/lib/pthread/library_pthread.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,6 @@ weak_alias(dummy_tsd, __pthread_tsd_main);
832832
__attribute__((constructor(48)))
833833
void __emscripten_init_main_thread(void) {
834834
__emscripten_init_main_thread_js(&__main_pthread);
835-
//printf("__emscripten_init_main_thread %p\n", __main_pthread);
836835

837836
// The pthread struct has a field that points to itself - this is used as
838837
// a magic ID to detect whether the pthread_t structure is 'alive'.

tests/test_other.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,8 +1667,8 @@ def test_dylink_pthread_static_data(self):
16671667
emcc_args=[
16681668
'-pthread', '-Wno-experimental',
16691669
'-s', 'PROXY_TO_PTHREAD',
1670-
'-s', 'EXIT_RUNTIME',
1671-
'-s', 'MAIN_MODULE=2',
1670+
'-s', 'EXIT_RUNTIME=1',
1671+
'-s', 'MAIN_MODULE=1',
16721672
'side.wasm',
16731673
])
16741674

0 commit comments

Comments
 (0)