mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 10:48:29 +00:00
Reduce makefile dependencies by 10%
The includes in libc/calls/calls.h have now been refactored so that functions with struct parameters are declared in libc/calls/struct/
This commit is contained in:
parent
4e7ce1538c
commit
adac64a52b
202 changed files with 372 additions and 319 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/weaken.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/state.internal.h"
|
||||
#include "libc/calls/strace.internal.h"
|
||||
|
@ -48,7 +49,7 @@
|
|||
*/
|
||||
int close(int fd) {
|
||||
int rc;
|
||||
_spinlock(&__fds_lock);
|
||||
__fds_lock();
|
||||
if (fd == -1) {
|
||||
rc = 0;
|
||||
} else if (fd < 0) {
|
||||
|
@ -80,7 +81,7 @@ int close(int fd) {
|
|||
__releasefd_unlocked(fd);
|
||||
}
|
||||
}
|
||||
_spunlock(&__fds_lock);
|
||||
__fds_unlock();
|
||||
STRACE("%s(%d) → %d% m", "close", fd, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue