mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Get LIBC_MEM and LIBC_STDIO building with aarch64
This commit is contained in:
parent
ae0ee59614
commit
d04430f4ef
81 changed files with 440 additions and 1064 deletions
|
@ -16,11 +16,12 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "net/https/sslcache.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/lockcmpxchg.h"
|
||||
#include "libc/intrin/cmpxchg.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
|
@ -32,7 +33,6 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "net/https/sslcache.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/x509_crt.h"
|
||||
|
||||
|
@ -131,7 +131,7 @@ int UncacheSslSession(void *data, mbedtls_ssl_session *session) {
|
|||
ts = time(0);
|
||||
if (!(e->time <= ts && ts <= e->time + cache->lifetime)) {
|
||||
DEBUGF("%u sslcache expired", i);
|
||||
_lockcmpxchg(&e->tick, tick, 0);
|
||||
_cmpxchg(&e->tick, tick, 0);
|
||||
return 1;
|
||||
}
|
||||
cert = 0;
|
||||
|
@ -201,7 +201,7 @@ int CacheSslSession(void *data, const mbedtls_ssl_session *session) {
|
|||
e->time = time(0);
|
||||
tick = rdtsc();
|
||||
asm volatile("" ::: "memory");
|
||||
if (tick && _lockcmpxchg(&e->pid, pid, 0)) {
|
||||
if (tick && _cmpxchg(&e->pid, pid, 0)) {
|
||||
DEBUGF("%u saved %s%s %`#.*s", i,
|
||||
mbedtls_ssl_get_ciphersuite_name(session->ciphersuite),
|
||||
session->compression ? " DEFLATE" : "", session->id_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue