Make more code aarch64 friendly

This commit is contained in:
Justine Tunney 2023-05-02 13:38:16 -07:00
parent ca2860947f
commit 2b73e72d59
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
568 changed files with 2197 additions and 1061 deletions

View file

@ -17,7 +17,8 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/intrin/lockxchg.h"
// TODO(jart): DELETE
/**
* Deletes file.
@ -29,6 +30,7 @@
* @asyncsignalsafe
*/
int unlink_s(const char **namep) {
const char *name = NULL;
return unlink(lockxchg(namep, &name));
const char *name = *namep;
*namep = 0;
return unlink(name);
}