mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Reduce MKDEPS.COM latency from 60ms to 18ms
This commit is contained in:
parent
e96aceae41
commit
517267a577
5 changed files with 140 additions and 76 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue