Skip to content

Commit 94665ee

Browse files
authored
[dylink] Remove redundant dlsync call. NFC (emscripten-core#20286)
dlsync is performed before returning from dlopen/dlsym. There is no needed pre-emptively call dlsync at the start of these operations.
1 parent 992d1e9 commit 94665ee

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

system/lib/libc/dynlink.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,6 @@ static struct dso* _dlopen(const char* file, int flags) {
551551
int cs;
552552
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
553553
do_write_lock();
554-
#ifdef _REENTRANT
555-
// Make sure we are in sync before performing any write operations.
556-
dlsync();
557-
#endif
558554

559555
char buf[2*NAME_MAX+2];
560556
file = resolve_path(buf, file, sizeof buf);
@@ -596,10 +592,6 @@ void emscripten_dlopen(const char* filename, int flags, void* user_data,
596592
return;
597593
}
598594
do_write_lock();
599-
#ifdef _REENTRANT
600-
// Make sure we are in sync before performing any write operations.
601-
dlsync();
602-
#endif
603595
char buf[2*NAME_MAX+2];
604596
filename = resolve_path(buf, filename, sizeof buf);
605597
struct dso* p = find_existing(filename);

0 commit comments

Comments
 (0)