Skip to content

Commit

Permalink
[dylink] Remove redundant dlsync call. NFC (#20286)
Browse files Browse the repository at this point in the history
dlsync is performed before returning from dlopen/dlsym.  There is no
needed pre-emptively call dlsync at the start of these operations.
  • Loading branch information
sbc100 authored Sep 19, 2023
1 parent 992d1e9 commit 94665ee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions system/lib/libc/dynlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,6 @@ static struct dso* _dlopen(const char* file, int flags) {
int cs;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
do_write_lock();
#ifdef _REENTRANT
// Make sure we are in sync before performing any write operations.
dlsync();
#endif

char buf[2*NAME_MAX+2];
file = resolve_path(buf, file, sizeof buf);
Expand Down Expand Up @@ -596,10 +592,6 @@ void emscripten_dlopen(const char* filename, int flags, void* user_data,
return;
}
do_write_lock();
#ifdef _REENTRANT
// Make sure we are in sync before performing any write operations.
dlsync();
#endif
char buf[2*NAME_MAX+2];
filename = resolve_path(buf, filename, sizeof buf);
struct dso* p = find_existing(filename);
Expand Down

0 comments on commit 94665ee

Please sign in to comment.