Reduce MKDEPS.COM latency from 60ms to 18ms

This commit is contained in:
Justine Tunney 2022-06-11 12:21:42 -07:00
parent e96aceae41
commit 517267a577
5 changed files with 140 additions and 76 deletions

View file

@ -49,7 +49,6 @@
*/
int close(int fd) {
int rc;
__fds_lock();
if (fd == -1) {
rc = 0;
} else if (fd < 0) {
@ -78,10 +77,9 @@ int close(int fd) {
}
}
if (!__vforked) {
__releasefd_unlocked(fd);
__releasefd(fd);
}
}
__fds_unlock();
STRACE("%s(%d) → %d% m", "close", fd, rc);
return rc;
}