#ifndef LLVM_LIBC_CONFIG_LINUX_APP_H
#define LLVM_LIBC_CONFIG_LINUX_APP_H
#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h"
namespace LIBC_NAMESPACE_DECL {
struct TLSImage {
uintptr_t address;
uintptr_t size;
uintptr_t init_size;
uintptr_t align;
};
struct Args {
uintptr_t argc;
uintptr_t argv[1];
};
struct AppProperties {
uintptr_t page_size;
Args *args;
TLSImage tls;
uintptr_t *env_ptr;
};
[[gnu::weak]] extern AppProperties app;
struct TLSDescriptor {
uintptr_t size = 0;
uintptr_t addr = 0;
uintptr_t tp = 0;
};
void init_tls(TLSDescriptor &tls);
void cleanup_tls(uintptr_t tls_addr, uintptr_t tls_size);
bool set_thread_ptr(uintptr_t val);
}
#endif